From 5322f857d3d26cf8a6830ae686385b5e87ed3afe Mon Sep 17 00:00:00 2001 From: David Hackbarth Date: Wed, 24 Sep 2025 13:10:15 +0200 Subject: [PATCH] add adjust window rect --- GDP/D3D9/Window.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GDP/D3D9/Window.cpp b/GDP/D3D9/Window.cpp index 6e2d272..511ba2e 100644 --- a/GDP/D3D9/Window.cpp +++ b/GDP/D3D9/Window.cpp @@ -21,14 +21,17 @@ INT Window::init(HINSTANCE hInstance, UINT width, UINT height) DWORD style = {}; style = WS_OVERLAPPEDWINDOW; // window with border & title //style = WS_POPUP; // window without any border or title + + RECT rect = { 100, 100, width + 100, height + 100 }; // left top right bottom + AdjustWindowRect(&rect, style, FALSE); // 4. create window instance _hWnd = CreateWindow( wc.lpszClassName, // class name of window class to be instantiated wc.lpszClassName, // window title style, // visual style - 100, 100, // window position (left-top corner) - width, height, // window size + rect.left, rect.top, // window position (left-top corner) + rect.right - rect.left, rect.bottom - rect.top, // window size nullptr, // handle to parent window nullptr, // handle to menu instance hInstance,