void CMainFrame::OnClose() { // Save the current state for toolbars and menus. SaveCommandBars(_T("CommandBars")); // Save the current state for docking panes. CXTPDockingPaneLayout layoutNormal(&m_paneManager); m_paneManager.GetLayout(&layoutNormal); layoutNormal.Save(_T("NormalLayout")); CFrameWnd::OnClose(); }
void CMainFrame::OnClose() { // TODO: Add your message handler code here and/or call default if (MessageBox(_T("土豪哥你确定退出?"), _T("提示"), MB_YESNO | MB_ICONQUESTION) == IDNO) return; CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd(); SaveCommandBars(_T("CommandBars")); pMainFrame->m_TrayIcon.RemoveIcon(); m_iocpServer->Shutdown(); delete m_iocpServer; CFrameWnd::OnClose(); }
void CMainFrame::OnClose() { // TODO: Add your message handler code here and/or call default CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd(); int iResult = MessageBox("您确认要退出???", " 温馨提示!", MB_ICONQUESTION|MB_YESNO); if(iResult != IDYES) return ; pMainFrame->m_TrayIcon.RemoveIcon(); m_iocpServer->Shutdown(); delete m_iocpServer; // Save the current state for toolbars and menus. SaveCommandBars(_T("CommandBars")); ///////////////////////托盘图标删除 NOTIFYICONDATA tnd; tnd.cbSize=sizeof(NOTIFYICONDATA); tnd.hWnd=AfxGetMainWnd()->m_hWnd; tnd.uID=IDR_MAINFRAME;//保证删除的是我们的图标 Shell_NotifyIcon(NIM_DELETE,&tnd); /////////////////////////////// CFrameWnd::OnClose(); }
void CMainFrame::OnClose() { SaveCommandBars(); SafeCall(m_paneLayout, SaveDockingPanes()); }