Improved the comment in the previous commit.

This commit is contained in:
Pietro Gagliardi 2018-02-17 12:56:47 -05:00
parent ee87a9db23
commit 6c85f39584
1 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,9 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
// not a menu
if (lParam != 0)
break;
// IDOK (1) and IDCANCEL (2) aren't menu events either
// IsDialogMessage() will also generate IDOK and IDCANCEL when pressing Enter and Escape (respectively) on some controls, like EDIT controls
// swallow those too; they'll cause runMenuEvent() to panic
// TODO fix the root cause somehow
if (HIWORD(wParam) != 0 || LOWORD(wParam) <= IDCANCEL)
break;
runMenuEvent(LOWORD(wParam), uiWindow(w));