From 4f563d90569c9e87faa6d82925a02b834ddd32c5 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 6 Jul 2020 22:07:14 +1000 Subject: Update to latest thmutil. --- src/Samples/bafunctions/bafunctions.vcxproj | 4 ++-- src/Samples/bafunctions/packages.config | 2 +- src/dnchost/dnchost.vcxproj | 4 ++-- src/dnchost/packages.config | 2 +- src/mbahost/mbahost.vcxproj | 4 ++-- src/mbahost/packages.config | 2 +- .../examples/TestEngine/Example.TestEngine.vcxproj | 4 ++-- src/test/examples/TestEngine/packages.config | 2 +- .../WixStandardBootstrapperApplication.cpp | 22 ++++++---------------- src/wixstdba/packages.config | 2 +- src/wixstdba/wixstdba.vcxproj | 4 ++-- 11 files changed, 21 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/Samples/bafunctions/bafunctions.vcxproj b/src/Samples/bafunctions/bafunctions.vcxproj index 7355cf0f..7312e802 100644 --- a/src/Samples/bafunctions/bafunctions.vcxproj +++ b/src/Samples/bafunctions/bafunctions.vcxproj @@ -4,7 +4,7 @@ - + @@ -59,7 +59,7 @@ - + diff --git a/src/Samples/bafunctions/packages.config b/src/Samples/bafunctions/packages.config index bfbf59dd..4642439f 100644 --- a/src/Samples/bafunctions/packages.config +++ b/src/Samples/bafunctions/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/src/dnchost/dnchost.vcxproj b/src/dnchost/dnchost.vcxproj index cda2b2f3..a130bd05 100644 --- a/src/dnchost/dnchost.vcxproj +++ b/src/dnchost/dnchost.vcxproj @@ -6,7 +6,7 @@ - + Debug @@ -85,6 +85,6 @@ - + \ No newline at end of file diff --git a/src/dnchost/packages.config b/src/dnchost/packages.config index 086c071e..29cc1384 100644 --- a/src/dnchost/packages.config +++ b/src/dnchost/packages.config @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/src/mbahost/mbahost.vcxproj b/src/mbahost/mbahost.vcxproj index 8f84f1cd..2b5b2ce7 100644 --- a/src/mbahost/mbahost.vcxproj +++ b/src/mbahost/mbahost.vcxproj @@ -7,7 +7,7 @@ - + @@ -85,6 +85,6 @@ - + \ No newline at end of file diff --git a/src/mbahost/packages.config b/src/mbahost/packages.config index 6fd987cb..5020bdb5 100644 --- a/src/mbahost/packages.config +++ b/src/mbahost/packages.config @@ -6,5 +6,5 @@ - + \ No newline at end of file diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj index 721f2263..17b76fe9 100644 --- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj +++ b/src/test/examples/TestEngine/Example.TestEngine.vcxproj @@ -3,7 +3,7 @@ - + Debug @@ -70,6 +70,6 @@ - + \ No newline at end of file diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config index bfbf59dd..4642439f 100644 --- a/src/test/examples/TestEngine/packages.config +++ b/src/test/examples/TestEngine/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index dd7ad229..8d07c760 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp @@ -2300,8 +2300,6 @@ private: // privates int x = CW_USEDEFAULT; int y = CW_USEDEFAULT; POINT ptCursor = { }; - HMONITOR hMonitor = NULL; - MONITORINFO mi = { }; // If the theme did not provide an icon, try using the icon from the bundle engine. if (!hIcon) @@ -2344,20 +2342,12 @@ private: // privates // Center the window on the monitor with the mouse. if (::GetCursorPos(&ptCursor)) { - hMonitor = ::MonitorFromPoint(ptCursor, MONITOR_DEFAULTTONEAREST); - if (hMonitor) - { - mi.cbSize = sizeof(mi); - if (::GetMonitorInfoW(hMonitor, &mi)) - { - x = mi.rcWork.left + (mi.rcWork.right - mi.rcWork.left - m_pTheme->nWidth) / 2; - y = mi.rcWork.top + (mi.rcWork.bottom - mi.rcWork.top - m_pTheme->nHeight) / 2; - } - } + x = ptCursor.x; + y = ptCursor.y; } - m_hWnd = ::CreateWindowExW(0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, m_pTheme->nWidth, m_pTheme->nHeight, HWND_DESKTOP, NULL, m_hModule, this); - ExitOnNullWithLastError(m_hWnd, hr, "Failed to create window."); + hr = ThemeCreateParentWindow(m_pTheme, 0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, HWND_DESKTOP, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWnd); + ExitOnFailure(hr, "Failed to create window."); hr = S_OK; @@ -2601,7 +2591,7 @@ private: // privates // OnCreate - finishes loading the theme. // BOOL OnCreate( - __in HWND hWnd + __in HWND /*hWnd*/ ) { HRESULT hr = S_OK; @@ -2612,7 +2602,7 @@ private: // privates BA_FUNCTIONS_ONTHEMELOADED_ARGS themeLoadedArgs = { }; BA_FUNCTIONS_ONTHEMELOADED_RESULTS themeLoadedResults = { }; - hr = ThemeLoadControls(m_pTheme, hWnd, vrgInitControls, countof(vrgInitControls)); + hr = ThemeLoadControls(m_pTheme, vrgInitControls, countof(vrgInitControls)); BalExitOnFailure(hr, "Failed to load theme controls."); C_ASSERT(COUNT_WIXSTDBA_PAGE == countof(vrgwzPageNames)); diff --git a/src/wixstdba/packages.config b/src/wixstdba/packages.config index 6fd987cb..5020bdb5 100644 --- a/src/wixstdba/packages.config +++ b/src/wixstdba/packages.config @@ -6,5 +6,5 @@ - + \ No newline at end of file diff --git a/src/wixstdba/wixstdba.vcxproj b/src/wixstdba/wixstdba.vcxproj index cb34c6ef..0d0ef073 100644 --- a/src/wixstdba/wixstdba.vcxproj +++ b/src/wixstdba/wixstdba.vcxproj @@ -7,7 +7,7 @@ - + @@ -80,6 +80,6 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc" - + \ No newline at end of file -- cgit v1.2.3-55-g6feb