void BdayFrame::menuStart( wxCommandEvent& event ) { const bool auto_run = start->IsChecked(); setAutoRun(auto_run); if ( getAutoRun() != auto_run ) { start->Check(!auto_run); wxMessageDialog mb(this , auto_run ? wxT("Could not set the registry entry to run BDay.") : wxT("Could not clear the registry entry to run BDay.") , GetTitle(), wxOK); mb.ShowModal(); } }
int APIENTRY wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR lpCmdLine, int nCmdShow) { #if Dllfn HMODULE hModule = GetModuleHandleW(L"user32.dll"); updateLayeredWindow = (lpfnUpdateLayeredWindow)GetProcAddress(hModule, "UpdateLayeredWindow"); #endif #ifndef DEBUG setAutoRun(); #endif MessageBoxW(NULL, L"UÅÌÒѽâËø£¡", L"Unlock", MB_OK); app.init(hInst); app.startWorkThread(); #ifndef DEBUG app.startSuperviseThread(); #endif MSG msg; #if Force while (true) { #endif while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } #if Force } #endif app.release(); return msg.wParam; }