还没学会走之前,不要跑!
Message based , event driven
每个程序都应该有一个如下的循环:
MSG msg;
while(GetMessage(&msg,NULL,NULL,NULL))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
MSG结构
typedef struct tagMSG
{
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
}MSG;
时间: 2024-10-28 15:09:15