Adaptation for WinXP

This commit is contained in:
SimplestStudio
2022-10-27 14:45:32 +03:00
parent 7d93e8f98c
commit 1fbafad1da
2 changed files with 5 additions and 2 deletions

View File

@ -269,12 +269,13 @@ core_windows {
-lcredui \
-lnetapi32 \
-lcomctl32 \
-lrpcrt4 \
-ldwmapi
-lrpcrt4
# -lOpenGL32
build_xp {
DEFINES += __OS_WIN_XP
} else {
LIBS += -ldwmapi
}
}

View File

@ -58,8 +58,10 @@ CWindowPlatform::CWindowPlatform(const QRect &rect) :
m_hWnd = (HWND)winId();
DWORD style = ::GetWindowLong(m_hWnd, GWL_STYLE);
::SetWindowLong(m_hWnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CAPTION);
#ifndef __OS_WIN_XP
const MARGINS shadow = {1, 1, 1, 1};
DwmExtendFrameIntoClientArea(m_hWnd, &shadow);
#endif
connect(this->window()->windowHandle(), &QWindow::screenChanged, this, [=]() {
QTimer::singleShot(50, this, [=]() {
resize(size() + QSize(1,1));