FUNCTION: MyRegisterClass() PURPOSE: Registers the window class.
| 206 | // PURPOSE: Registers the window class. |
| 207 | // |
| 208 | ATOM MyRegisterClass(HINSTANCE hInstance) |
| 209 | { |
| 210 | WNDCLASSEXW wcex; |
| 211 | |
| 212 | wcex.cbSize = sizeof(WNDCLASSEX); |
| 213 | |
| 214 | wcex.style = CS_HREDRAW | CS_VREDRAW; |
| 215 | wcex.lpfnWndProc = WndProc; |
| 216 | wcex.cbClsExtra = 0; |
| 217 | wcex.cbWndExtra = 0; |
| 218 | wcex.hInstance = hInstance; |
| 219 | wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_PLAYGROUNDWIN32)); |
| 220 | wcex.hCursor = LoadCursor(nullptr, IDC_ARROW); |
| 221 | wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); |
| 222 | wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_PLAYGROUNDWIN32); |
| 223 | wcex.lpszClassName = szWindowClass; |
| 224 | wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); |
| 225 | |
| 226 | return RegisterClassExW(&wcex); |
| 227 | } |
| 228 | |
| 229 | // |
| 230 | // FUNCTION: InitInstance(HINSTANCE, int) |