mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.Win32 SDK fix
git-svn-id: svn://ultimatepp.org/upp/trunk@8477 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9c8fd1664f
commit
c27a5d250b
1 changed files with 5 additions and 1 deletions
|
|
@ -20,8 +20,12 @@ void GetStdFontSys(String& name, int& height)
|
|||
if(SetProcessDPIAware)
|
||||
(*SetProcessDPIAware)();
|
||||
NONCLIENTMETRICS ncm;
|
||||
#if (WINVER >= 0x0600)
|
||||
ncm.cbSize = sizeof(ncm) - sizeof(ncm.iPaddedBorderWidth); // WinXP does not like it...
|
||||
#else
|
||||
ncm.cbSize = sizeof(ncm);
|
||||
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
|
||||
#endif
|
||||
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
|
||||
name = FromSystemCharset(ncm.lfMenuFont.lfFaceName);
|
||||
height = abs((int)ncm.lfMenuFont.lfHeight);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue