I'm using resourcefiles so this is my DiagFunction:
BOOL MainDiag (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) /* handle the messages */ { case WM_DESTROY: EndDialog (hwnd, 0); /* send a WM_QUIT to the message queue */ return TRUE; break; case WM_CLOSE: EndDialog (hwnd, 0); /* send a WM_QUIT to the message queue */ return TRUE; break; case WM_COMMAND: switch (LOWORD(lParam)) { case IDM_ENDE: EndDialog (hwnd, 0); /* send a WM_QUIT */ return TRUE; break; default: return FALSE; break; } default: /* for messages that we don't deal with */ return FALSE; }
return 0; }
if I hit my "ENDE" button nothing happens.. why??
I've found my problem. it's got to be LOWORD(wParam)
try also EndDialog("parent", "itemname"); like Enddialog(hwnd, IDC_ENDE);
also switch (LOWORD(wParam)) if you dont like that try
lParam = HIWORD; wParam = LOWORD;
Log in to post a comment.
I'm using resourcefiles so this is my DiagFunction:
BOOL MainDiag (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_DESTROY:
EndDialog (hwnd, 0); /* send a WM_QUIT to the message queue */
return TRUE;
break;
case WM_CLOSE:
EndDialog (hwnd, 0); /* send a WM_QUIT to the message queue */
return TRUE;
break;
case WM_COMMAND:
switch (LOWORD(lParam))
{
case IDM_ENDE:
EndDialog (hwnd, 0); /* send a WM_QUIT */
return TRUE;
break;
default:
return FALSE;
break;
}
default: /* for messages that we don't deal with */
return FALSE;
}
return 0;
}
if I hit my "ENDE" button nothing happens.. why??
I've found my problem.
it's got to be LOWORD(wParam)
try also EndDialog("parent", "itemname");
like Enddialog(hwnd, IDC_ENDE);
also switch (LOWORD(wParam))
if you dont like that try
lParam = HIWORD;
wParam = LOWORD;