首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

关于GetMessage的有关问题

2013-01-06 
关于GetMessage的问题/* 这样的代码可以正常退出 */while (GetMessage (&msg, NULL, 0, 0)){TranslateMess

关于GetMessage的问题


/* 这样的代码可以正常退出 */
while (GetMessage (&msg, NULL, 0, 0))
     {
          TranslateMessage (&msg) ;
          DispatchMessage (&msg) ;
     }
/* 这样的代码窗口被销毁,当程序并未被结束 */
while (GetMessage (&msg, hwnd, 0, 0))
     {
          TranslateMessage (&msg) ;
          DispatchMessage (&msg) ;
     }

求解?
[解决办法]
hWnd
[in]
Handle to the window whose messages are to be retrieved. The window must belong to the calling thread.

The NULL value has a special meaning:
NULL
GetMessage retrieves messages for any window that belongs to the calling thread and thread messages posted to the calling thread using the PostThreadMessage function.

热点排行