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,