mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlLib: Now using SetProcessDpiAwareness when available
git-svn-id: svn://ultimatepp.org/upp/trunk@11058 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
fd35586a12
commit
520cf171b6
1 changed files with 11 additions and 4 deletions
|
|
@ -596,10 +596,17 @@ void ChSysInit()
|
|||
ChReset();
|
||||
XpClear();
|
||||
|
||||
BOOL (STDAPICALLTYPE * SetProcessDPIAware)(void);
|
||||
DllFn(SetProcessDPIAware, "User32.dll", "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware && Ctrl::IsUHDEnabled())
|
||||
(*SetProcessDPIAware)();
|
||||
|
||||
HRESULT (STDAPICALLTYPE *SetProcessDpiAwareness)(int);
|
||||
DllFn(SetProcessDpiAwareness, "Shcore.dll", "SetProcessDpiAwareness");
|
||||
if(SetProcessDpiAwareness)
|
||||
SetProcessDpiAwareness(1);
|
||||
else {
|
||||
BOOL (STDAPICALLTYPE * SetProcessDPIAware)(void);
|
||||
DllFn(SetProcessDPIAware, "User32.dll", "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware && Ctrl::IsUHDEnabled())
|
||||
(*SetProcessDPIAware)();
|
||||
}
|
||||
NONCLIENTMETRICS ncm;
|
||||
#if (WINVER >= 0x0600 && !defined(__MINGW32_VERSION))
|
||||
ncm.cbSize = sizeof(ncm) - sizeof(ncm.iPaddedBorderWidth); // WinXP does not like it...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue