mirror of
https://github.com/reactos/reactos.git
synced 2026-06-07 16:32:28 +08:00
[SHLWAPI][SHLWAPI_APITEST] Fix SHGetPerScreenResName (#5701)
Use HORZRES and VERTRES instead of SM_CXFULLSCREEN and SM_CYFULLSCREEN. CORE-9283
This commit is contained in:
committed by
GitHub
parent
08cc45eef9
commit
ff5ccb5948
@@ -826,10 +826,14 @@ static void SHPropertyBag_OnIniFile(void)
|
||||
|
||||
static void SHPropertyBag_PerScreenRes(void)
|
||||
{
|
||||
HDC hDC = GetDC(NULL);
|
||||
INT cxWidth = GetDeviceCaps(hDC, HORZRES);
|
||||
INT cyHeight = GetDeviceCaps(hDC, VERTRES);
|
||||
INT cMonitors = GetSystemMetrics(SM_CMONITORS);
|
||||
ReleaseDC(NULL, hDC);
|
||||
|
||||
WCHAR szBuff1[64], szBuff2[64];
|
||||
StringCchPrintfW(szBuff1, _countof(szBuff1), L"%dx%d(%d)",
|
||||
GetSystemMetrics(SM_CXFULLSCREEN), GetSystemMetrics(SM_CYFULLSCREEN),
|
||||
GetSystemMetrics(SM_CMONITORS));
|
||||
StringCchPrintfW(szBuff1, _countof(szBuff1), L"%dx%d(%d)", cxWidth, cyHeight, cMonitors);
|
||||
|
||||
szBuff2[0] = UNICODE_NULL;
|
||||
SHGetPerScreenResName(szBuff2, _countof(szBuff2), 0);
|
||||
|
||||
Reference in New Issue
Block a user