|
Two things could be missing:
1- You did not include this line >mmsystem.h< in the stdafx.h
2- You did not include/link to the WINMM.LIB in the linker ALT+7 list.
Try and should work fine-> coz the code is good!
|
|
|
|
|
Two things could be missing:
1- You did not include this line <mmsystem.h> in the stdafx.h
2- You did not include/link to the WINMM.LIB in the linker ALT+F7 list.
Try and should work fine -> coz the code is good!
|
|
|
|
|
I suggested that too, but if it's a lib error, it should know the constants defined and fail in the link stage, and if it's the #include, how come it knows PlaySound, but not the constants ?
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Thanks all i really needed your help...
|
|
|
|
|
Anyone out there written anything to do byte order swapping?
I have a mixed file containing both Big endian and Little endian 32 bit integers. I read the u_long ntohl(u_long network) function in winsock2.h but it does not give me the correct value back when I swap it. I tried this and got mixxed result based on reading by char 1 2 3 and 4 times.
union byte4
{
int I;
char ch[4];
}
did swap with this function
byte4 swap(byte4 in)
{
byte4 swp;
swp = in;
in.ch[0] = swp.ch[3];
in.ch[1] = swp.ch[2];
in.ch[2] = swp.ch[1];
in.ch[3] = swp.ch[0];
in.ch[4] = NULL;
return in;
}
Any ideas whats going wrong here?
|
|
|
|
|
Hello mate,
This is what I use and it works
DWORD ReverseByteOrder(DWORD* pdwRaw)
{
unsigned char c[4];
memcpy( &c, pdwRaw, 4);
DWORD dwReturn = c[3] | (c[2] << 8) | (c[1] << 16) | (c[0] << 24);
return dwReturn;
}
Hope this helps!
|
|
|
|
|
Is there a way, to place a CFileDialog into a Propertysheet. I now there is a way, MS did it!
Please help
Sjoerd
|
|
|
|
|
MS did not use the propertysheet in a dialog. If you are refering to the
file/project dialogs in VJ++/InterDev 6.0 then take a closer look.
It is the normal tab control in the extended CFileDialog with the controls
hidden or shown depending on which tab you click--this is the normal tab control operation.
Regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
I did see it. So what I really have to do is when other tabs are selected that per example the "OPEN" tab, is hiding some or all controls of the CFileDialog, and bring new ones fore.
Sjoerd
|
|
|
|
|
Right. You can make it even easier by inserting thin dialogs on the tab control, this way hiding the dialog hides all the controls--just anything you can do with the standard Windows tab control is ok.
Regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
Is there any control in MFC that lets you view the directory tree of your drive or a listview of files in certain directory?
If not, how can I build a list of that kind? What functions can i use? And how can I get the icons for each file listed?
Basically, i would want my app to look a bit like ACDSee, but for another purpose of course.
Thanx in advance!
|
|
|
|
|
Hello,
There is no MFC class by MS to do what you wish. However, a lot of codes exist
at the codeguru site to help. You can take a look at the following code too
http://www.codeproject.com/shell/seashell.asp
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
buy this book: Programming Windows with MFC 2n edition!
|
|
|
|
|
Hi,
We are using dao to connect to various typses of databases, access, oracle, and sql server. This way our clients can choose which one they want to use. We have just encountered a problem, where one of our clients tables has over 255 fields. They are using sql server. Sql Server allows you to create tables with up to 1000 fields, but using dao to access them will only allow you to create recordsets with up to 255 fields! I believe that I can't even select from TWO tables that will end up in a recordset with more than 255 fields. Does anyone have any ideas as to how to get around this problem?
Thank You
|
|
|
|
|
The problem lies deeper than DAO. The Jet database engine only supports 255 fields per table so you might be out of luck
|
|
|
|
|
Hi,
I would like to learn a bit more about programming and would like
to focus on client-server application.
Does anyone know about tips and pointers where I can learn more about
this. I would like to know what it takes to write an application like,
say ArcServe, with a set of services running on the server and a
desktop application on the client side.
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
URGENT: Please let me know some way to convert my existing database from access97/98 to access 2k in
VC++ using DAO
|
|
|
|
|
Hi there, I'm making a typelibrary with ATL for visual basic users. Does anyone know how you can create a static function so that it appears in the <globals> section when i look at my library with the objectbrowser in VB ?
|
|
|
|
|
Hi,
Just a small query:
I want to check if a certain module (.exe, i know its path) is running ? (VC++)
Thanks a lot.
|
|
|
|
|
If you are writting the other module try creating named Mutex
// Create named mutex
hNamedMutex = CreateMutex(NULL, TRUE, "The Other App");
// Test if the programm is already running
if(GetLastError() == ERROR_ALREADY_EXISTS) {
// Do Somthing
}
If you don't ...
the you have two approaches one is to enumerate the windows by using The EnumWindows function which enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE
If you want to enumerate the processes.
Under Windows 95, you must use functions from the ToolHelp32 group of APIs. Under Windows NT, you use functions from PSAPI.DLL, which is available in the Platform SDK.
// Sample Code FOR NT
#include <windows.h>
#include <stdio.h>
#include "psapi.h"
#pragma comment (lib, "psapi.lib")
void PrintProcessNameAndID( DWORD processID )
{
char szProcessName[MAX_PATH] = "unknown";
// Get a handle to the process.
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
PROCESS_VM_READ,
FALSE, processID );
// Get the process name.
if ( hProcess )
{
HMODULE hMod;
DWORD cbNeeded;
if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod),
&cbNeeded) )
{
GetModuleBaseName( hProcess, hMod, szProcessName,
sizeof(szProcessName) );
}
}
// Print the process name and identifier.
printf( "%s (Process ID: %u)\n", szProcessName, processID );
CloseHandle( hProcess );
}
void main( )
{
// Get the list of process identifiers.
DWORD aProcesses[1024], cbNeeded, cProcesses;
unsigned int i;
if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
return;
// Calculate how many process identifiers were returned.
cProcesses = cbNeeded / sizeof(DWORD);
// Print the name and process identifier for each process.
for ( i = 0; i < cProcesses; i++ )
PrintProcessNameAndID( aProcesses[i] );
}
Hope this helps
Cheers
G. ALfadhly
<marquee>
It is Illogical to define an inventor by his invention
|
|
|
|
|
Hi,
I am trying to Terminate a process under WINNT and i am facing problems in loading the psapi.lib file.
Can i get some help???
Looking forward for a solution..
Nayan
|
|
|
|
|
These PSAPI.lib, is distributed in the Microsoft® Platform Software Development Kit (SDK).
after installing PLatform SDK make suer you also set the envirnoment parameters such as path and other thingys (run the batch file)
For the SDK download
http://msdn.microsoft.com/library/psdk/portals/mainport.htm
Hope that will help
Cheers
Alfadhly
<marquee>
If I had a hammer
|
|
|
|
|
Hi,
Just a small query:
I want to check if a certain module (.exe, i know its path) is running ?
Thanks a lot.
|
|
|
|
|
is there a way to capture the menus that pop up when any button is clicked in the tool bar controls provided in IE?
Subir
|
|
|
|
|
PrintScreen doesn't work? Try HyperSnap... search www.download.com or www.tucows.com
...or maybe you mean something else besides screen capture?
|
|
|
|