Message Processing

I have a dialog box resource that looks like this:

1
2
3
4
5
6
7
8
9
10
11
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
IDD_ABOUT DIALOG 0, 0, 152, 74
STYLE DS_3DLOOK | DS_CENTER | DS_CONTROL | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
EXSTYLE  WS_EX_STATICEDGE
CAPTION "About"
FONT 8, "Palatino Linotype"
{
    DEFPUSHBUTTON   "OK", IDB_OK, 89, 29, 50, 15, 
    CONTROL         "Made using Microsoft® Visual C++", IDC_VISUALC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP | SS_CENTERIMAGE, 9, 4, 116, 8
    CONTROL         "Express® 2008 and ResEdit®.", IDC_RESEDIT, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP | SS_CENTERIMAGE, 9, 12, 83, 8
}


with a DlgProc that looks like this:

1
2
3
4
5
6
7
8
9
10
INT_PTR CALLBACK About(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	if(msg == WM_INITDIALOG)
		return (INT_PTR)TRUE;

	if(msg == WM_COMMAND && LOWORD(wParam) == IDB_OK)
		EndDialog(hwnd, LOWORD(wParam));

return (INT_PTR)FALSE;
}


The dialog box is spawned from within the main window's procedure(another dialog box) with DialogBox() when one of the main window's controls is clicked, and the messages are being retrieved with
GetMessage(&msg, NULL, 0, 0 )
which should retrieve ALL messages, from whatever window or control.

The problem is when I click the control and the ABOUT box spawns, it freezes. What's even more disturbing is that it worked..until I modified the source code, without however affecting the message processing system. So, any ideas?

Thanks in advance.
Last edited on
What'd you modify?
Topic archived. No new replies allowed.