Dialogue box in the program is displayed but button will not respond.
I created dialogue box using resource wizard,
code in Resource.rc for dialogue box is generated as below
Code:
IDD_DIALOG1 DIALOGEX 0, 0, 131, 69
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Test dialogue"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "That is Good",IDOK,30,35,66,25
LTEXT "Test is successful .",IDC_STATIC,33,15,75,11
END
Dialogue box is associated with a menu item by the code
Code:
case IDM_ABOUT:
CreateDialog(hInst, MAKEINTRESOURCE(IDD_DIALOG1),hwindp, Dialog1Proc);
return 0;
break;
message processor for the dialogue box is as below
Code:
INT_PTR CALLBACK Dialog1Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{ case WM_INITDIALOG:
return (INT_PTR)TRUE;
return a;
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
// return (INT_PTR) TRUE;
}
return (INT_PTR) FALSE;
}
Adding a case statement IDOK did not help
Code:
case IDOK:
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
I really need some help at this point, i will be glad if i can get help now.