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

Function mswin_init_message_window

outdated/sys/wince/mhmsgwnd.c:56–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54#endif
55
56HWND
57mswin_init_message_window()
58{
59 static int run_once = 0;
60 HWND ret;
61 DWORD style;
62
63 if (!run_once) {
64 register_message_window_class();
65 run_once = 1;
66 }
67
68#ifdef MSG_WRAP_TEXT
69 style = WS_BORDER | WS_CHILD | WS_CLIPSIBLINGS | WS_VSCROLL;
70#else
71 style = WS_BORDER | WS_CHILD | WS_CLIPSIBLINGS | WS_VSCROLL | WS_HSCROLL;
72#endif
73
74 ret = CreateWindow(
75 szMessageWindowClass, /* registered class name */
76 NULL, /* window name */
77 style, /* window style */
78 0, /* horizontal position of window */
79 0, /* vertical position of window */
80 0, /* window width */
81 0, /* window height - set it later */
82 GetNHApp()->hMainWnd, /* handle to parent or owner window */
83 NULL, /* menu handle or child identifier */
84 GetNHApp()->hApp, /* handle to application instance */
85 NULL); /* window-creation data */
86
87 if (!ret)
88 panic("Cannot create message window");
89
90 return ret;
91}
92
93void
94register_message_window_class()

Callers 1

mswin_create_nhwindowFunction · 0.70

Calls 3

GetNHAppFunction · 0.70
panicFunction · 0.50

Tested by

no test coverage detected