MCPcopy Create free account
hub / github.com/NetHack/NetHack / register_map_window_class

Function register_map_window_class

win/win32/mhmap.c:524–546  ·  view source on GitHub ↗

register window class for map window */

Source from the content-addressed store, hash-verified

522
523/* register window class for map window */
524void
525register_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 */
549LRESULT CALLBACK

Callers 1

mswin_init_map_windowFunction · 0.70

Calls 3

GetNHAppFunction · 0.70
RGBClass · 0.50
panicFunction · 0.50

Tested by

no test coverage detected