From 50162f5e79ffb0c0dec2d9cec0ea60ed76ef51e6 Mon Sep 17 00:00:00 2001 From: Kaehvaman Date: Fri, 25 Oct 2024 12:33:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D1=83=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=B0=D1=80=D0=B8=D0=B5=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab16/lab16/lab16.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lab16/lab16/lab16.cpp b/lab16/lab16/lab16.cpp index b03801a..01c6101 100644 --- a/lab16/lab16/lab16.cpp +++ b/lab16/lab16/lab16.cpp @@ -103,16 +103,17 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { hInst = hInstance; // Сохранить маркер экземпляра в глобальной переменной + // стиль окна без кнопки разворачивания на весь экран и без возможности измения размера int wstyle = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX); - RECT wnd = { 0, 0, N * WIDTH, M * HEIGHT }; + RECT wnd = { 0, 0, N * WIDTH, M * HEIGHT }; // желаемый размер клиентской области окна AdjustWindowRectEx(&wnd, wstyle, 1, WS_EX_COMPOSITED); int width = wnd.right - wnd.left; int height = wnd.bottom - wnd.top; RECT workarea; - SystemParametersInfoW(SPI_GETWORKAREA, 0, &workarea, 0); + SystemParametersInfoW(SPI_GETWORKAREA, 0, &workarea, 0); // get size of primary desktop without taskbar int cx = ((workarea.right - workarea.left) / 2) - (width / 2); int cy = ((workarea.bottom - workarea.top) / 2) - (height / 2);