The dialog box never shows up!!?! Oh by the way I'm using this tutorial:
http://sunlightd.virtualave.net/Wind...alogBoxes.html
The dialog box never shows up!!?! Oh by the way I'm using this tutorial:
http://sunlightd.virtualave.net/Wind...alogBoxes.html
Downloaded the code..opened it in VC++ (as that's what Sunlight used for coding it).....works AOK for me...
Might I guess that you are not using VC++???
If you are porting it to another compiler like CodeWarrior, Devc++ or Borland, be careful that the
MAKEINTRESOURCE(IDD_DIALOG1)
in the call to DialogBoxParam actually refers to the dialog box in your project...some resource editord store the identifier of a resource as a string.....but MSVC prefers them as an int......
Borland does too.Originally posted by Fordy
some resource editord store the identifier of a resource as a string.....but MSVC prefers them as an int......
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
i'm using borland and i did what you said and it still doesn't come up...
Ok.....make the following change to your _tmain func...Originally posted by drdroid
i'm using borland and i did what you said and it still doesn't come up...
If you dont have a dialog, you shoud get a messagbox.....tell me what that messagebox says...Code:int _tmain(void) { TCHAR buff[50]; int x = DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)MainDialogProc, 0); if(x== -1){ wsprintf(buff,"Error - %d",GetLastError()); MessageBox(NULL,buff,NULL,MB_OK); } return 0; }
Sorry...had to edit tha above code after posting...make sure it says IDD_DIALOG1...not 20
the window doesn't come up at all... for thoughs new to this thread.
Post your code?
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.