Ticket #1499: fz2224_restore.patch

File fz2224_restore.patch, 885 bytes (added by tommywu, 17 years ago)

fix restore problem

  • MainFrm.cpp

    old new  
    36143614        WINDOWPLACEMENT placement;
    36153615        placement.length = sizeof(WINDOWPLACEMENT);
    36163616        placement.rcNormalPosition = m_PosData.NormalRect;
    3617         placement.showCmd = SW_RESTORE;
     3617        if (m_bMaxBeforeTray)
     3618            placement.showCmd = SW_SHOWMAXIMIZED;
     3619        else
     3620            placement.showCmd = SW_RESTORE;
    36183621        SetWindowPlacement(&placement);
    36193622        m_PosData.state = 0;
    36203623    }
     
    36333636            ShowWindow(SW_HIDE);
    36343637            m_TrayIcon.AddIcon();
    36353638            m_TrayIcon.ShowIcon();
     3639        }
     3640        else if (m_PosData.state)
     3641        {
     3642            WINDOWPLACEMENT placement;
     3643            BOOL res=GetWindowPlacement(&placement);
     3644            if (placement.showCmd==SW_MAXIMIZE || placement.showCmd==SW_SHOWMAXIMIZED)
     3645                m_bMaxBeforeTray = true;
     3646            else
     3647                m_bMaxBeforeTray = false;
    36363648        }
    36373649    }
    36383650    else if (nID == SC_MINIMIZETRAY)