forked from github_mirror/framelesshelper
win: make sure we can still compile this project using some old windows sdks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
9d71baffd1
commit
cfb0842726
|
@ -162,6 +162,14 @@ using MONITOR_DPI_TYPE = enum MONITOR_DPI_TYPE
|
||||||
MDT_DEFAULT = MDT_EFFECTIVE_DPI
|
MDT_DEFAULT = MDT_EFFECTIVE_DPI
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using _DWM_WINDOW_CORNER_PREFERENCE = enum _DWM_WINDOW_CORNER_PREFERENCE
|
||||||
|
{
|
||||||
|
_DWMWCP_DEFAULT = 0,
|
||||||
|
_DWMWCP_DONOTROUND = 1,
|
||||||
|
_DWMWCP_ROUND = 2,
|
||||||
|
_DWMWCP_ROUNDSMALL = 3
|
||||||
|
};
|
||||||
|
|
||||||
EXTERN_C MMRESULT WINAPI
|
EXTERN_C MMRESULT WINAPI
|
||||||
timeGetDevCaps(
|
timeGetDevCaps(
|
||||||
_Out_writes_bytes_(cbtc) LPTIMECAPS ptc,
|
_Out_writes_bytes_(cbtc) LPTIMECAPS ptc,
|
||||||
|
|
|
@ -1329,7 +1329,7 @@ void Utils::forceSquareCornersForWindow(const WId windowId, const bool force)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto hwnd = reinterpret_cast<HWND>(windowId);
|
const auto hwnd = reinterpret_cast<HWND>(windowId);
|
||||||
const DWM_WINDOW_CORNER_PREFERENCE wcp = (force ? DWMWCP_DONOTROUND : DWMWCP_ROUND);
|
const _DWM_WINDOW_CORNER_PREFERENCE wcp = (force ? _DWMWCP_DONOTROUND : _DWMWCP_ROUND);
|
||||||
const HRESULT hr = pDwmSetWindowAttribute(hwnd, _DWMWA_WINDOW_CORNER_PREFERENCE, &wcp, sizeof(wcp));
|
const HRESULT hr = pDwmSetWindowAttribute(hwnd, _DWMWA_WINDOW_CORNER_PREFERENCE, &wcp, sizeof(wcp));
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
qWarning() << __getSystemErrorMessage(kDwmSetWindowAttribute, hr);
|
qWarning() << __getSystemErrorMessage(kDwmSetWindowAttribute, hr);
|
||||||
|
|
Loading…
Reference in New Issue