15,979
社区成员
发帖
与我相关
我的任务
分享
CreateThread(NULL, 0, ChanageTitle, LPVOID(NULL), 0, NULL);
// 进入主消息循环
while( TRUE )
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_QUIT)
{
break; // 退出循环, 结束游戏
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
DWORD WINAPI ChanageTitle(LPVOID lpParamter)
{
int i=0;
while (i>-1)
{
CString str;
str.Format("%d",i++);
SetWindowText(g_hWnd, str);
Sleep(100);
}
return 0;
}