I have a dialog box as a resource. Here is the message loop:
Code:
BOOL WINAPI DlgProc(HANDLE hDlg, int msg, int param1, long param2)
{
switch (msg)
{
case WM_DESTROY:
PostQuitMessage(0);
return true;
break;
case WM_CLOSE:
PostQuitMessage(0);
break;
case WM_KEYDOWN:
MessageBox(0,"Hello","Hello",0);
break;
default: return false;
}
return false;
}
WM_KEYDOWN is sent when a key is pressed, as long as there are no buttons or controls on the dialog box. (I'm guessing the message is sent to the buttons and stuff rather than the dialog) How can I make it so that when the user presses enter in my EDITTEXT, the program can be told and do stuff?