register window class for map window */
| 522 | |
| 523 | /* register window class for map window */ |
| 524 | void |
| 525 | register_map_window_class(void) |
| 526 | { |
| 527 | WNDCLASS wcex; |
| 528 | ZeroMemory(&wcex, sizeof(wcex)); |
| 529 | |
| 530 | /* window class */ |
| 531 | wcex.style = CS_NOCLOSE | CS_DBLCLKS; |
| 532 | wcex.lpfnWndProc = (WNDPROC) MapWndProc; |
| 533 | wcex.cbClsExtra = 0; |
| 534 | wcex.cbWndExtra = 0; |
| 535 | wcex.hInstance = GetNHApp()->hApp; |
| 536 | wcex.hIcon = NULL; |
| 537 | wcex.hCursor = LoadCursor(NULL, IDC_ARROW); |
| 538 | wcex.hbrBackground = |
| 539 | CreateSolidBrush(RGB(0, 0, 0)); /* set backgroup here */ |
| 540 | wcex.lpszMenuName = NULL; |
| 541 | wcex.lpszClassName = szNHMapWindowClass; |
| 542 | |
| 543 | if (!RegisterClass(&wcex)) { |
| 544 | panic("cannot register Map window class"); |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | /* map window procedure */ |
| 549 | LRESULT CALLBACK |
no test coverage detected