| 35 | static void mswin_direct_command(); |
| 36 | |
| 37 | HWND |
| 38 | mswin_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 | |
| 72 | void |
| 73 | register_main_window_class() |
no test coverage detected