mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Fixed hidpi issues in Win32
git-svn-id: svn://ultimatepp.org/upp/trunk@6086 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d43a5a9b6a
commit
837a01cf02
3 changed files with 11 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ void OutFilterStream::Close()
|
|||
void OutFilterStream::FlushOut()
|
||||
{
|
||||
if(ptr != ~buffer) {
|
||||
Filter(~buffer, ptr - ~buffer);
|
||||
Filter(~buffer, (int)(ptr - ~buffer));
|
||||
ptr = ~buffer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,6 +243,12 @@ void Ctrl::InitWin32(HINSTANCE hInstance)
|
|||
{
|
||||
GuiLock __;
|
||||
LLOG("InitWin32");
|
||||
|
||||
BOOL (STDAPICALLTYPE * SetProcessDPIAware)(void);
|
||||
DllFn(SetProcessDPIAware, "User32.dll", "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware)
|
||||
(*SetProcessDPIAware)();
|
||||
|
||||
InstallPanicMessageBox(&Win32PanicMessageBox);
|
||||
// RLOGBLOCK("Ctrl::InitWin32");
|
||||
sMainThreadId = GetCurrentThreadId();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ void GetStdFontSys(String& name, int& height)
|
|||
name = "Arial";
|
||||
height = 10;
|
||||
#else
|
||||
BOOL (STDAPICALLTYPE * SetProcessDPIAware)(void);
|
||||
DllFn(SetProcessDPIAware, "User32.dll", "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware)
|
||||
(*SetProcessDPIAware)();
|
||||
NONCLIENTMETRICS ncm;
|
||||
ncm.cbSize = sizeof(ncm);
|
||||
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue