| 300 | } |
| 301 | |
| 302 | void Window_Create(int width, int height) { |
| 303 | ULONG ulFlags = FCF_SHELLPOSITION | FCF_TASKLIST |
| 304 | | FCF_SIZEBORDER | FCF_ICON | FCF_MAXBUTTON |FCF_MINBUTTON |
| 305 | | FCF_MAXBUTTON | FCF_TITLEBAR | FCF_SYSMENU; |
| 306 | |
| 307 | if (!WinRegisterClass(habAnchor, CC_WIN_CLASSNAME, ClientWndProc, 0, 0)) { |
| 308 | Process_Abort2(LOUSHORT(WinGetLastError(habAnchor)), "Window class registration failed"); |
| 309 | } |
| 310 | hwndFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE | WS_SYNCPAINT, &ulFlags, |
| 311 | CC_WIN_CLASSNAME, "ClassiCube", 0L, NULLHANDLE, 0, &hwndClient); |
| 312 | if (hwndFrame == NULLHANDLE) { |
| 313 | Process_Abort2(LOUSHORT(WinGetLastError(habAnchor)), "Failed to create window"); |
| 314 | } |
| 315 | Window_SetSize(width, height); |
| 316 | Window_Main.Exists = true; |
| 317 | Window_Main.Handle.ptr = &hwndFrame; |
| 318 | Window_Main.Focused = TRUE; |
| 319 | |
| 320 | WinSetVisibleRegionNotify(hwndClient, TRUE); |
| 321 | // Send an invlaidation message to the client. |
| 322 | WinPostMsg(hwndFrame, WM_VRNENABLED, 0L, 0L); |
| 323 | } |
| 324 | |
| 325 | void Window_Create2D(int width, int height) { |
| 326 | Window_Create(width, height); |
no test coverage detected