From 219964095a1f4678d8c8e7ae2685c52392161ca2 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 6 Jul 2020 19:22:37 +1000 Subject: WIXFEAT:4906 Make Window's Height and Width refer to its client area. --- src/dutil/inc/dpiutil.h | 21 +++++++++++++++++++++ src/dutil/inc/thmutil.h | 2 ++ 2 files changed, 23 insertions(+) (limited to 'src/dutil/inc') diff --git a/src/dutil/inc/dpiutil.h b/src/dutil/inc/dpiutil.h index 8c61ab19..4ea689c5 100644 --- a/src/dutil/inc/dpiutil.h +++ b/src/dutil/inc/dpiutil.h @@ -25,6 +25,13 @@ typedef struct _DPIU_WINDOW_CONTEXT UINT nDpi; } DPIU_WINDOW_CONTEXT; +typedef BOOL (APIENTRY* PFN_ADJUSTWINDOWRECTEXFORDPI)( + __in LPRECT lpRect, + __in DWORD dwStyle, + __in BOOL bMenu, + __in DWORD dwExStyle, + __in UINT dpi + ); typedef HRESULT (APIENTRY *PFN_GETDPIFORMONITOR)( __in HMONITOR hmonitor, __in MONITOR_DPI_TYPE dpiType, @@ -38,6 +45,20 @@ typedef UINT (APIENTRY *PFN_GETDPIFORWINDOW)( void DAPI DpiuInitialize(); void DAPI DpiuUninitialize(); +/******************************************************************** + DpiuAdjustWindowRect - calculate the required size of the window rectangle, + based on the desired size of the client rectangle + and the provided DPI. + +*******************************************************************/ +void DAPI DpiuAdjustWindowRect( + __in RECT* pWindowRect, + __in DWORD dwStyle, + __in BOOL fMenu, + __in DWORD dwExStyle, + __in UINT nDpi + ); + /******************************************************************** DpiuGetMonitorContextFromPoint - get the DPI context of the monitor from the given point. diff --git a/src/dutil/inc/thmutil.h b/src/dutil/inc/thmutil.h index 1ba5db35..00fa1381 100644 --- a/src/dutil/inc/thmutil.h +++ b/src/dutil/inc/thmutil.h @@ -289,6 +289,8 @@ struct THEME int nMinimumHeight; int nWidth; int nMinimumWidth; + int nWindowHeight; + int nWindowWidth; int nSourceX; int nSourceY; UINT uStringId; -- cgit v1.2.3-55-g6feb