//线程函数 DWORD WINAPI ThreadProc(LPVOID lpParameter) { MSG msg; hwndDLG=CreateDialog(hinst,MAKEINTRESOURCE(WuMa_MainDlg),NULL,(DLGPROC)DlgProc); SetWindowTextA(hwndDLG,(LPCSTR)BasePeple()); char Money[128]; itoa(*BaseMoney(),Money,10); SetDlgItemTextA(hwndDLG,IDC_NAME,(LPCSTR)BasePeple()); SetDlgItemTextA(hwndDLG,IDC_MONEY,(LPCSTR)Money); //RegisterHotKey(0,100,0,VK_HOME); //while (GetMessage(&msg,0,0,0)) //{ // switch(msg.message) // { // case WM_HOTKEY: // ShowWindow(hwndDLG,SW_SHOW); // SwitchToThisWindow(hwndDLG,TRUE);//窗口置前 // break; // } // TranslateMessage(&msg); // DispatchMessage(&msg); //} //UnregisterHotKey(0,100); ShowWindow(hwndDLG,SW_SHOW); SwitchToThisWindow(hwndDLG,TRUE);//窗口置前 while (GetMessage(&msg,0,0,0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; return TRUE; }