ON_COMMAND(ID_HELP_CONTENTS, OnHelpContents)
ON_WM_CLOSE()
ON_COMMAND(ID_TOOLS_GENERATEPATCH, OnToolsGeneratePatch)
+ ON_WM_TIMER()
ON_WM_DESTROY()
ON_COMMAND_RANGE(ID_UNPACK_MANUAL, ID_UNPACK_AUTO, OnPluginUnpackMode)
ON_UPDATE_COMMAND_UI_RANGE(ID_UNPACK_MANUAL, ID_UNPACK_AUTO, OnUpdatePluginUnpackMode)
return 0;
}
+void CMainFrame::OnTimer(UINT_PTR nIDEvent)
+{
+ CMDIFrameWnd::OnTimer(nIDEvent);
+
+ if (nIDEvent == IDT_UPDATEMAINMENU)
+ {
+ KillTimer(nIDEvent);
+
+ BOOL bMaximized;
+ MDIGetActive(&bMaximized);
+
+ // When MDI maximized the window icon is drawn on the menu bar, so we
+ // need to notify it that our icon has changed.
+ if (bMaximized)
+ DrawMenuBar();
+
+ OnUpdateFrameTitle(FALSE);
+ }
+}
+
void CMainFrame::OnDestroy(void)
{
if (m_pDropHandler != nullptr)
afx_msg void OnUpdateCompareMethod(CCmdUI* pCmdUI);
afx_msg void OnMRUs(UINT nID);
afx_msg void OnUpdateNoMRUs(CCmdUI* pCmdUI);
+ afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnDestroy();
afx_msg void OnAccelQuit();
//}}AFX_MSG
#define WMU_CHILDFRAMEREMOVED (WM_APP + 11)
#define WMU_CHILDFRAMEACTIVATE (WM_APP + 12)
#define WMU_CHILDFRAMEACTIVATED (WM_APP + 13)
+#define IDT_UPDATEMAINMENU 1
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
{\r
SetIcon(hReplace, TRUE);\r
\r
- BOOL bMaximized;\r
- GetMDIFrame()->MDIGetActive(&bMaximized);\r
-\r
- // When MDI maximized the window icon is drawn on the menu bar, so we\r
- // need to notify it that our icon has changed.\r
- if (bMaximized)\r
- {\r
- GetMDIFrame()->DrawMenuBar();\r
- }\r
- GetMDIFrame()->OnUpdateFrameTitle(FALSE);\r
+ AfxGetMainWnd()->SetTimer(IDT_UPDATEMAINMENU, 500, nullptr);\r
}\r
\r
theApp.SetLastCompareResult(nResult);\r