mirror of
https://github.com/reactos/reactos.git
synced 2024-11-11 01:04:11 +00:00
ad73e17418
Add user32_vista.dll to introduce new NT6+ User32 features without changing the existing User32.dll when compiled as NT5.x. Also implements a stub for GetDpiForWindow(). The GetDpiForWindow() function will be required to Wine-sync common controls to modern Wine versions. Changes: Expose GetDpiForWindow() function and USER_DEFAULT_SCREEN_DPI to appropriate versions in winuser.h Introduce a basic user32_vista library that can be expanded as needed.
44 lines
774 B
C
44 lines
774 B
C
/*
|
|
* PROJECT: ReactOS Kernel - Vista+ APIs
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
* PURPOSE: DPI functions for user32 and user32_vista.
|
|
* COPYRIGHT: Copyright 2024 Carl Bialorucki <cbialo2@outlook.com>
|
|
*/
|
|
|
|
#define WIN32_NO_STATUS
|
|
#define _INC_WINDOWS
|
|
#define COM_NO_WINDOWS_H
|
|
#include <windef.h>
|
|
#include <wingdi.h>
|
|
#include <winuser.h>
|
|
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
/*
|
|
* @stub
|
|
*/
|
|
UINT
|
|
WINAPI
|
|
GetDpiForSystem(VOID)
|
|
{
|
|
HDC hDC;
|
|
UINT Dpi;
|
|
hDC = GetDC(NULL);
|
|
Dpi = GetDeviceCaps(hDC, LOGPIXELSY);
|
|
ReleaseDC(NULL, hDC);
|
|
return Dpi;
|
|
}
|
|
|
|
/*
|
|
* @stub
|
|
*/
|
|
UINT
|
|
WINAPI
|
|
GetDpiForWindow(
|
|
_In_ HWND hWnd)
|
|
{
|
|
UNIMPLEMENTED_ONCE;
|
|
UNREFERENCED_PARAMETER(hWnd);
|
|
return GetDpiForSystem();
|
|
}
|