[SHELL32][SDK] Implement SHIsTempDisplayMode (#5523)

CORE-9277
This commit is contained in:
Katayama Hirofumi MZ 2023-08-07 09:50:30 +09:00 committed by GitHub
parent a6d264e4f0
commit 63fae07d12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 11 deletions

View file

@ -520,3 +520,33 @@ BOOL WINAPI SHDesktopMessageLoop(HANDLE hDesktop)
return TRUE;
}
/*************************************************************************
* SHIsTempDisplayMode [SHELL32.724]
*
* Is the current display settings temporary?
*/
EXTERN_C BOOL WINAPI SHIsTempDisplayMode(VOID)
{
TRACE("\n");
if (GetSystemMetrics(SM_REMOTESESSION) || GetSystemMetrics(SM_REMOTECONTROL))
return FALSE;
DEVMODEW DevMode;
ZeroMemory(&DevMode, sizeof(DevMode));
DevMode.dmSize = sizeof(DevMode);
if (!EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &DevMode))
return FALSE;
if (!DevMode.dmPelsWidth || !DevMode.dmPelsHeight)
return FALSE;
HDC hDC = GetDC(NULL);
DWORD cxWidth = GetDeviceCaps(hDC, HORZRES);
DWORD cyHeight = GetDeviceCaps(hDC, VERTRES);
ReleaseDC(NULL, hDC);
return (cxWidth != DevMode.dmPelsWidth || cyHeight != DevMode.dmPelsHeight);
}

View file

@ -130,17 +130,6 @@ GetFileDescriptor(FILEGROUPDESCRIPTOR *pFileGroupDesc, BOOL bUnicode, INT iIndex
return NULL;
}
/*
* Unimplemented
*/
EXTERN_C BOOL
WINAPI
SHIsTempDisplayMode(VOID)
{
FIXME("SHIsTempDisplayMode() stub\n");
return FALSE;
}
/*
* Unimplemented
*/

View file

@ -189,6 +189,8 @@ DWORD WINAPI SHNetConnectionDialog(
LPCWSTR lpstrRemoteName,
DWORD dwType);
BOOL WINAPI SHIsTempDisplayMode(VOID);
/****************************************************************************
* Cabinet Window Messages
*/