register window class for map window */
| 323 | |
| 324 | /* register window class for map window */ |
| 325 | void |
| 326 | register_map_window_class() |
| 327 | { |
| 328 | WNDCLASS wcex; |
| 329 | ZeroMemory(&wcex, sizeof(wcex)); |
| 330 | |
| 331 | /* window class */ |
| 332 | wcex.style = CS_NOCLOSE | CS_DBLCLKS; |
| 333 | wcex.lpfnWndProc = (WNDPROC) MapWndProc; |
| 334 | wcex.cbClsExtra = 0; |
| 335 | wcex.cbWndExtra = 0; |
| 336 | wcex.hInstance = GetNHApp()->hApp; |
| 337 | wcex.hIcon = NULL; |
| 338 | wcex.hCursor = LoadCursor(NULL, IDC_ARROW); |
| 339 | wcex.hbrBackground = |
| 340 | CreateSolidBrush(RGB(0, 0, 0)); /* set backgroup here */ |
| 341 | wcex.lpszMenuName = NULL; |
| 342 | wcex.lpszClassName = szNHMapWindowClass; |
| 343 | |
| 344 | if (!RegisterClass(&wcex)) { |
| 345 | panic("cannot register Map window class"); |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | /* map window procedure */ |
| 350 | LRESULT CALLBACK |
no test coverage detected