int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); MainWnd window; if (!window.getWindowHandle()) { // If window was not initialized, test failed return 1; } window.Show(nCmdShow); MessageBoxW(GetActiveWindow(), L"1. The window underneath should have label,\n" " which will provide further instructions", L"Instructions", MB_OK); MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } if(MessageBoxW(GetActiveWindow(), L"Was everything according to the instructions?", L"Test", MB_YESNO) == IDNO) return 1; return (int) msg.wParam; }