mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Detect and handle resolution changes while running
This commit is contained in:
parent
2107aea0c3
commit
78bc4ba9dc
@ -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
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user