FUNCTION: InitInstance(HINSTANCE, int) PURPOSE: Saves instance handle and creates main window COMMENTS: In this function, we save the instance handle in a global variable and create and display the main program window.
| 237 | // create and display the main program window. |
| 238 | // |
| 239 | BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) |
| 240 | { |
| 241 | hInst = hInstance; // Store instance handle in our global variable |
| 242 | |
| 243 | HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, |
| 244 | CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr); |
| 245 | |
| 246 | if (!hWnd) |
| 247 | { |
| 248 | return FALSE; |
| 249 | } |
| 250 | |
| 251 | ShowWindow(hWnd, nCmdShow); |
| 252 | UpdateWindow(hWnd); |
| 253 | |
| 254 | RefreshBabylon(hWnd); |
| 255 | |
| 256 | return TRUE; |
| 257 | } |
| 258 | |
| 259 | // |
| 260 | // FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM) |
no test coverage detected