diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index ffae1328..a7804a52 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -2378,6 +2378,19 @@ LRESULT CMeterWindow::OnNcHitTest(WPARAM wParam, LPARAM lParam) return HTCLIENT; } +/* +** OnSettingChange +** +** Called when resolution changes +** +*/ +LRESULT CMeterWindow::OnSettingChange(WPARAM wParam, LPARAM lParam) +{ + Refresh(false); + m_Monitors.count = 0; + return DefWindowProc(m_Window, m_Message, wParam, lParam); +} + /* ** OnWindowPosChanging ** @@ -2912,6 +2925,7 @@ LRESULT CALLBACK CMeterWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR MESSAGE(OnWindowPosChanging, WM_WINDOWPOSCHANGING) MESSAGE(OnCopyData, WM_COPYDATA) MESSAGE(OnDelayedExecute, WM_DELAYED_EXECUTE) + MESSAGE(OnSettingChange, WM_SETTINGCHANGE) END_MESSAGEPROC } diff --git a/Library/MeterWindow.h b/Library/MeterWindow.h index 7820b867..4b080922 100644 --- a/Library/MeterWindow.h +++ b/Library/MeterWindow.h @@ -195,6 +195,8 @@ protected: LRESULT OnLeftButtonUp(WPARAM wParam, LPARAM lParam); LRESULT OnRightButtonUp(WPARAM wParam, LPARAM lParam); LRESULT OnDelayedExecute(WPARAM wParam, LPARAM lParam); + LRESULT OnSettingChange(WPARAM wParam, LPARAM lParam); + private: void CreateRegion(bool clear);