Detect and handle resolution changes while running

This commit is contained in:
Brian Todoroff 2009-03-25 02:56:56 +00:00
parent 2107aea0c3
commit 78bc4ba9dc
2 changed files with 16 additions and 0 deletions

View File

@ -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
}

View File

@ -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);