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

Function mswin_init_main_window

outdated/sys/wince/mhmain.c:37–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35static void mswin_direct_command();
36
37HWND
38mswin_init_main_window()
39{
40 static int run_once = 0;
41 HWND ret;
42 RECT rc;
43
44 /* register window class */
45 if (!run_once) {
46 LoadString(GetNHApp()->hApp, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
47 register_main_window_class();
48 run_once = 1;
49 }
50
51 /* create the main window */
52 SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, 0);
53
54 ret = CreateWindow(szMainWindowClass, /* registered class name */
55 szTitle, /* window name */
56 WS_CLIPCHILDREN, /* window style */
57 rc.left, /* horizontal position of window */
58 rc.top, /* vertical position of window */
59 rc.right - rc.left, /* window width */
60 rc.bottom - rc.top, /* window height */
61 NULL, /* handle to parent or owner window */
62 NULL, /* menu handle or child identifier */
63 GetNHApp()->hApp, /* handle to application instance */
64 NULL /* window-creation data */
65 );
66
67 if (!ret)
68 panic("Cannot create main window");
69 return ret;
70}
71
72void
73register_main_window_class()

Callers 1

mswin_init_nhwindowsFunction · 0.70

Calls 3

GetNHAppFunction · 0.70
panicFunction · 0.50

Tested by

no test coverage detected