Evil Dialog Boxes...
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.
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?
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.
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.
Also, you could take a look at GetDlgItemInt, GetDlgItemText (and SetDlgItemInt...), there are quite useful
Chris
Chris
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement