summaryrefslogtreecommitdiffstats
path: root/tools/graphics-app-framework/windows/win-window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/graphics-app-framework/windows/win-window.cpp')
-rw-r--r--tools/graphics-app-framework/windows/win-window.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/graphics-app-framework/windows/win-window.cpp b/tools/graphics-app-framework/windows/win-window.cpp
index 3bbf2575a..a86e360d0 100644
--- a/tools/graphics-app-framework/windows/win-window.cpp
+++ b/tools/graphics-app-framework/windows/win-window.cpp
@@ -243,7 +243,7 @@ static ATOM createWindowClassAtom()
windowClassDesc.cbWndExtra = 0;
windowClassDesc.hInstance = (HINSTANCE) GetModuleHandle(0);
windowClassDesc.hIcon = 0;
- windowClassDesc.hCursor = 0;
+ windowClassDesc.hCursor = LoadCursorW(NULL, IDC_ARROW);
windowClassDesc.hbrBackground = 0;
windowClassDesc.lpszMenuName = 0;
windowClassDesc.lpszClassName = L"SlangGraphicsWindow";
@@ -269,22 +269,32 @@ Window* createWindow(WindowDesc const& desc)
OSString windowTitle(desc.title);
DWORD windowExtendedStyle = 0;
- DWORD windowStyle = 0;
+ DWORD windowStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU;
HINSTANCE instance = (HINSTANCE) GetModuleHandle(0);
+ RECT windowRect;
+ windowRect.left = 0;
+ windowRect.top = 0;
+ windowRect.bottom = desc.height;
+ windowRect.right = desc.width;
+ AdjustWindowRect(&windowRect, windowStyle, FALSE);
+
HWND windowHandle = CreateWindowExW(
windowExtendedStyle,
(LPWSTR) getWindowClassAtom(),
windowTitle,
windowStyle,
- 0, 0, // x, y
- desc.width, desc.height,
+ CW_USEDEFAULT,
+ 0, // x, y
+ windowRect.right,
+ windowRect.bottom,
NULL, // parent
NULL, // menu
instance,
window);
+
if(!windowHandle)
{
delete window;