aboutsummaryrefslogtreecommitdiff
path: root/src/dutil/inc
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-07-06 16:22:38 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-07-06 21:30:49 +1000
commitabeba64d77336b3fbf9aafe9ecc66b779c1e5d02 (patch)
tree7af0a5f74071685cf22f75ec9ca6bd457227089e /src/dutil/inc
parent00bd06f02cf168eb0752e1d0819969a528742ba7 (diff)
downloadwix-abeba64d77336b3fbf9aafe9ecc66b779c1e5d02.tar.gz
wix-abeba64d77336b3fbf9aafe9ecc66b779c1e5d02.tar.bz2
wix-abeba64d77336b3fbf9aafe9ecc66b779c1e5d02.zip
Add ability for ThemeCreateParentWindow to center on the monitor.
Diffstat (limited to 'src/dutil/inc')
-rw-r--r--src/dutil/inc/dpiutil.h15
-rw-r--r--src/dutil/inc/thmutil.h7
2 files changed, 22 insertions, 0 deletions
diff --git a/src/dutil/inc/dpiutil.h b/src/dutil/inc/dpiutil.h
index c6f73b02..8c61ab19 100644
--- a/src/dutil/inc/dpiutil.h
+++ b/src/dutil/inc/dpiutil.h
@@ -14,6 +14,12 @@ extern "C" {
14#define USER_DEFAULT_SCREEN_DPI 96 14#define USER_DEFAULT_SCREEN_DPI 96
15#endif 15#endif
16 16
17typedef struct _DPIU_MONITOR_CONTEXT
18{
19 UINT nDpi;
20 MONITORINFOEXW mi;
21} DPIU_MONITOR_CONTEXT;
22
17typedef struct _DPIU_WINDOW_CONTEXT 23typedef struct _DPIU_WINDOW_CONTEXT
18{ 24{
19 UINT nDpi; 25 UINT nDpi;
@@ -33,6 +39,15 @@ void DAPI DpiuInitialize();
33void DAPI DpiuUninitialize(); 39void DAPI DpiuUninitialize();
34 40
35/******************************************************************** 41/********************************************************************
42 DpiuGetMonitorContextFromPoint - get the DPI context of the monitor from the given point.
43
44*******************************************************************/
45HRESULT DAPI DpiuGetMonitorContextFromPoint(
46 __in const POINT* pt,
47 __out DPIU_MONITOR_CONTEXT** ppMonitorContext
48 );
49
50/********************************************************************
36 DpiuGetWindowContext - get the DPI context of the given window. 51 DpiuGetWindowContext - get the DPI context of the given window.
37 52
38*******************************************************************/ 53*******************************************************************/
diff --git a/src/dutil/inc/thmutil.h b/src/dutil/inc/thmutil.h
index c75f9587..1ba5db35 100644
--- a/src/dutil/inc/thmutil.h
+++ b/src/dutil/inc/thmutil.h
@@ -81,6 +81,12 @@ typedef enum THEME_SHOW_PAGE_REASON
81 THEME_SHOW_PAGE_REASON_REFRESH, 81 THEME_SHOW_PAGE_REASON_REFRESH,
82} THEME_SHOW_PAGE_REASON; 82} THEME_SHOW_PAGE_REASON;
83 83
84typedef enum THEME_WINDOW_INITIAL_POSITION
85{
86 THEME_WINDOW_INITIAL_POSITION_DEFAULT,
87 THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES,
88} THEME_WINDOW_INITIAL_POSITION;
89
84 90
85struct THEME_COLUMN 91struct THEME_COLUMN
86{ 92{
@@ -394,6 +400,7 @@ HRESULT DAPI ThemeCreateParentWindow(
394 __in_opt HWND hwndParent, 400 __in_opt HWND hwndParent,
395 __in_opt HINSTANCE hInstance, 401 __in_opt HINSTANCE hInstance,
396 __in_opt LPVOID lpParam, 402 __in_opt LPVOID lpParam,
403 __in THEME_WINDOW_INITIAL_POSITION initialPosition,
397 __out_opt HWND* phWnd 404 __out_opt HWND* phWnd
398 ); 405 );
399 406