Evil Dialog Boxes...

Started by
4 comments, last by origil 22 years, 9 months ago
I created a dialog box resource, but now when I create the dialog box with the DialogBox function the box simply doesn''t appear nor is it in use, I put a messagebox in the initialization code to check if it even reads it and it doesn''t. DialogBox(main_instance,MAKEINTRESOURCE(ID_MapSizeDialog),NULL,(DLGPROC)&MapSizeProc); When I change the NULL to main_window_handle which is the handle to the program''s main window, the initialization code works and displays a message box and after that the dialog box appears in the main window but everything is stuck, the only thing I can do is shut it down using the Ctrl+Alt+Del. Any ideas? Any help would be greatly appreciated.
The Department of Next Life - Get your Next-Life Insurance here!
Advertisement
I had that problem to (only with DialogBoxParam()) and it was because I screwed up the message handler... like none of the messages we''re actually handled, only FALSE was returned.
Thanks for the reply, my message handler was fine, the resource had an undefinded item.
But now I''ve got another problem if anyone could be kind enough to solve...
I know how to use the WM_GETLINE message for retreiving text in the form of char, but how can I retreive a number which was typed in the edit box in whole and not in an array?
#include
using namespace std;

int main(void) {
char szBuffer[5] = "1234";
int iNumber = atoi(szBuffer);
return 0;
}

This converts the numeric string "1234" into the integral equivalent, the number 1234. Hope this was what you were looking for. Good luck.
"The time has come", the Walrus said, "To speak of many things."
Yeah, that''s what I was looking for, Thanks sympathy
The Department of Next Life - Get your Next-Life Insurance here!
Also, you could take a look at GetDlgItemInt, GetDlgItemText (and SetDlgItemInt...), there are quite useful


Chris

This topic is closed to new replies.

Advertisement