while (GetMessage(&msg,0,0,0))
{
if (IsDialogMessage(w,&msg)) continue;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
这个程序里·IsDialogMessage()把消息给指定窗口的wndproc处理,那之后为什么还有dispatchMSG呢?
...全文
1272打赏收藏
isdialogMessage问题
while (GetMessage(&msg,0,0,0)) { if (IsDialogMessage(w,&msg)) continue; TranslateMessage(&msg); DispatchMessage(&msg); } 这个程序里·IsDialogMessage()把消息给指定窗口的wndproc处理,那之后为什么还有dispatchMSG呢?
哦,刚找到答案
Note that the application is responsible for retrieving and dispatching input messages to the dialog box. Most applications use the main message loop for this. However, to permit the user to move to and to select controls by using the keyboard, the application must call IsDialogMessage.