|
|
@@ -110,10 +110,13 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
m_PowerManager.Start(m_hWnd);
|
|
|
|
|
|
////Center the main window so message boxes are in the center
|
|
|
- //CRect rcScreen;
|
|
|
- //GetMonitorRect(0, &rcScreen);
|
|
|
- //CPoint cpCenter = rcScreen.CenterPoint();
|
|
|
- ////MoveWindow(cpCenter.x, cpCenter.x, - 2, - 2);
|
|
|
+ CRect rcScreen;
|
|
|
+ GetMonitorRect(0, &rcScreen);
|
|
|
+ CPoint cpCenter = rcScreen.CenterPoint();
|
|
|
+ MoveWindow(cpCenter.x, cpCenter.x, 1, 1);
|
|
|
+
|
|
|
+ m_startupScreenWidth = GetScreenWidth();
|
|
|
+ m_startupScreenHeight = GetScreenHeight();
|
|
|
|
|
|
//Then set the main window to transparent so it's never shown
|
|
|
//if it is shown then only the task tray icon
|
|
|
@@ -1359,7 +1362,11 @@ void CMainFrame::OnFirstFixupstickycliporder()
|
|
|
|
|
|
LRESULT CMainFrame::OnResolutionChange(WPARAM wParam, LPARAM lParam)
|
|
|
{
|
|
|
- SetTimer(SCREEN_RESOLUTION_CHANGED, 1000, NULL);
|
|
|
+ if (m_startupScreenWidth != GetScreenWidth() ||
|
|
|
+ m_startupScreenHeight != GetScreenHeight())
|
|
|
+ {
|
|
|
+ SetTimer(SCREEN_RESOLUTION_CHANGED, 1000, NULL);
|
|
|
+ }
|
|
|
|
|
|
return TRUE;
|
|
|
}
|