|
From: Vlada D. <dj...@im...> - 2002-09-19 10:06:26
|
Hi, everybody.
Here=92s another (dum) question from me: I wrote a simple program which
should display a dialog box when I push the menu button, but when I do
that, the dialog doesn=92t display. Judging from my code, DialogBox
function returns -1. What could be the cause of this? Here=92s a piece =
of
code:
=20
case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_HELP_ABOUT: //menu item
int
ret=3DDialogBox(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_ABOUTDLG),hwnd,=
A
boutDlgProc);
if(ret=3D=3DIDOK)
MessageBox(hwnd,"Dialog
OK","Success",MB_OK|MB_ICONINFORMATION);
else if(ret=3D=3DIDCANCEL)
MessageBox(hwnd,"Dialog
cancel","Success",MB_OK|MB_ICONINFORMATION);
else if(ret=3D=3D-1)
MessageBox(hwnd,"Dialog
Fail!","Error",MB_OK|MB_ICONSTOP);
break;
}
break;
|