OSDN Git Service

PATCH: [ 1690503 ] fix for bug 1659281 "WinMerge forgets monitor to use when th
authorKimmo Varis <kimmov@gmail.com>
Fri, 30 Mar 2007 14:04:19 +0000 (14:04 +0000)
committerKimmo Varis <kimmov@gmail.com>
Fri, 30 Mar 2007 14:04:19 +0000 (14:04 +0000)
 - Submitted by from Dan Pidcock

Src/Changes.txt
Src/MainFrm.cpp

index 3f72c06..b7a9638 100644 (file)
@@ -2,6 +2,11 @@ Src\Changes.txt
 Add new items to top.
 (This summarizes all changes to all files under Src, including Src\Languages.)
 
+2007-03-30 Kimmo
+ PATCH: [ 1690503 ] fix for bug 1659281 "WinMerge forgets monitor to use when th
+  Submitted by from Dan Pidcock
+  Src: MainFrm.cpp
+
 2007-03-30 Gal
  RFE: [ 1690346 ] Manual selection of syntax highlighting scheme
   Src/Languages/*: Merge*.rc
index a2cf93f..a0e7a7c 100644 (file)
@@ -1636,7 +1636,10 @@ void CMainFrame::ActivateFrame(int nCmdShow)
        wp.rcNormalPosition.top=theApp.GetProfileInt(_T("Settings"), _T("MainTop"),0);
        wp.rcNormalPosition.right=theApp.GetProfileInt(_T("Settings"), _T("MainRight"),0);
        wp.rcNormalPosition.bottom=theApp.GetProfileInt(_T("Settings"), _T("MainBottom"),0);
-       wp.showCmd = nCmdShow;
+       if (nCmdShow != SW_MINIMIZE && theApp.GetProfileInt(_T("Settings"), _T("MainMax"), FALSE))
+               wp.showCmd = SW_MAXIMIZE;
+       else
+               wp.showCmd = nCmdShow;
 
        CRect dsk_rc,rc(wp.rcNormalPosition);
 
@@ -1644,11 +1647,7 @@ void CMainFrame::ActivateFrame(int nCmdShow)
        dsk_rc.top = ::GetSystemMetrics(SM_YVIRTUALSCREEN);
        dsk_rc.right = dsk_rc.left + ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
        dsk_rc.bottom = dsk_rc.top + ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
-       if (nCmdShow != SW_MINIMIZE && theApp.GetProfileInt(_T("Settings"), _T("MainMax"), FALSE))
-       {
-               CMDIFrameWnd::ActivateFrame(SW_MAXIMIZE);
-       }
-       else if (rc.Width() != 0 && rc.Height() != 0)
+       if (rc.Width() != 0 && rc.Height() != 0)
        {
                // Ensure top-left corner is on visible area,
                // 20 points margin is added to prevent "lost" window