void CMainFrame::OnClose() { // Save the state of the Status Bar SaveBarState( _T( "MainFrmBarSettings" ) ); CRect myRect; // Get the size of the frame window GetWindowRect(myRect); // Save the frame settings to the INI file g_config.GetIni().SetValue( _T( "RipperFrame" ), _T( "FrameWndLeft" ), myRect.left ); g_config.GetIni().SetValue( _T( "RipperFrame" ), _T( "FrameWndTop" ), myRect.top ); g_config.GetIni().SetValue( _T( "RipperFrame" ), _T( "FrameWndRight" ), myRect.right ); g_config.GetIni().SetValue( _T( "RipperFrame" ), _T( "FrameWndBottom" ), myRect.bottom ); // g_config.GetIni().SetValue( _T( "PlayToolBar" ), // _T( "Show" ), // (m_wndPlayBar.GetStyle() & WS_VISIBLE) ); // g_config.GetIni().SetValue( _T( "RecordToolBar" ), // _T( "Show" ), // (m_wndToolBar.GetStyle() & WS_VISIBLE) ); CFrameWnd::OnClose(); }
BOOL CMainFrame::DestroyWindow() { CString sProfile = _T("Windows\\BarState"); CSizingControlBar::GlobalSaveState(this, sProfile); SaveBarState(sProfile); return CFrameWnd::DestroyWindow(); }
void CMainFrame::OnDestroy() { WINDOWPLACEMENT wp; memset (&wp, 0 , sizeof(wp)); wp.length = sizeof(wp); GetWindowPlacement(&wp); if ( wp.showCmd == SW_SHOWMINIMIZED ) wp.showCmd = SW_SHOW; ::WritePrivateProfileBinary("View" , "WindowPlacement" ,(LPBYTE)&wp, sizeof(wp), szGLOBAL_PROFILE); CWinApp* pApp = AfxGetApp(); const char* pProfSave= pApp->m_pszProfileName; pApp->m_pszProfileName = szGLOBAL_PROFILE; SaveBarState("View"); pApp->m_pszProfileName = pProfSave; if ( m_wndSplitter.GetRowCount() > 1 ) { m_wndSplitter.SavePosition(); } SaveBarState("JMC"); //vls-begin// multiple output // m_coolBar.Save(); for (int i = 0; i < MAX_OUTPUT; i++) m_coolBar[i].Save(); //vls-end// // save history CFile histFile; //vls-begin// base dir // if ( histFile.Open("history.dat", CFile::modeCreate | CFile::modeWrite ) ) { CString strFile(szBASE_DIR); strFile += "\\history.dat"; if ( histFile.Open(strFile, CFile::modeCreate | CFile::modeWrite ) ) { //vls-end// CArchive ar(&histFile, CArchive::store); m_editBar.GetHistory().Serialize (ar); } pMainWnd = NULL; CFrameWnd::OnDestroy(); }
BOOL CMainFrame::DestroyWindow() { for (int iBar = 0; iBar < SIZING_BARS; iBar++) { CSizingControlBarG *pBar = STATIC_DOWNCAST(CSizingControlBarG, GetBarAtOffset(m_SizingBarInfo[iBar].Offset)); pBar->SaveState(REG_SETTINGS); } SaveBarState(REG_SETTINGS); return CMDIFrameWnd::DestroyWindow(); }
void CMainFrame::OnClose() { // save toolbar's window placement, see Prosise p728 for why we do it here instead SaveBarState(_T("ToolBarSettings")); // save window placement - main window CWindowPlacement MainWindowPlacement; MainWindowPlacement.Save(_T("Main Window"), this); Inherited::OnClose(); }
void CLeashFrame::OnDestroy() { CString strText; BOOL bIconic, bMaximized; WINDOWPLACEMENT wndpl; wndpl.length = sizeof(WINDOWPLACEMENT); // gets current window position and // iconized/maximized status BOOL bRet = GetWindowPlacement(&wndpl); if (wndpl.showCmd == SW_SHOWNORMAL) { bIconic = FALSE; bMaximized = FALSE; } else if (wndpl.showCmd == SW_SHOWMAXIMIZED) { bIconic = FALSE; bMaximized = TRUE; } else if (wndpl.showCmd == SW_SHOWMINIMIZED) { bIconic = TRUE; if (wndpl.flags) { bMaximized = TRUE; } else { bMaximized = FALSE; } } strText.Format("%04d %04d %04d %04d", wndpl.rcNormalPosition.left, wndpl.rcNormalPosition.top, wndpl.rcNormalPosition.right, wndpl.rcNormalPosition.bottom); AfxGetApp()->WriteProfileString(s_profileHeading, s_profileRect, strText); AfxGetApp()->WriteProfileInt(s_profileHeading, s_profileIcon, bIconic); AfxGetApp()->WriteProfileInt(s_profileHeading, s_profileMax, bMaximized); SaveBarState(AfxGetApp()->m_pszProfileName); CFrameWndEx::OnDestroy(); }
void CSearchDlg::OnClose() { SaveBarState(SEARCH_PARAMS_PROFILE); // MORPH leuk_he:run as ntservice v1.. workarround a mfc bug if (RunningAsService()) { DWORD dwProcessId; DWORD dwThreadId= GetWindowThreadProcessId(m_hWnd,&dwProcessId); EnumThreadWindows(dwThreadId, EnumProc,(LPARAM) dwThreadId); } // MORPH leuk_he:run as ntservice v1.. CFrameWnd::OnClose(); }
BOOL COutlookFrame::DestroyWindow() { CString sProfile(_T("BarState")); m_wndControlBar.SaveState(sProfile); SaveBarState(sProfile); // DestroyWindow will destroy all childs so let's tell it to Inteface. if (m_pInterface != NULL) { m_pInterface->ResetView(); } return CProjectFrame::DestroyWindow(); }
void CMainFrame::OnClose() { if ( m_nAppMode==modeDebug || m_nAppMode==modeDebugBreak) { if ( AfxMessageBox("This command will stop debugger", MB_OKCANCEL)==IDOK ) OnDebugStopdebugging(); else return; } SaveBarState(_T("Build")); if ( m_nAppMode!=modeNoProject ) GetProject()->SaveModified(); CMDIFrameWnd::OnClose(); }
void CPlayerFrame::OnClose() { CRect myRect; // Get the size of the frame window GetWindowRect(myRect); // Save the frame settings to the INI file g_config.GetIni().SetValue( _W( "PlayerFrame"), _W( "FrameWndLeft"), myRect.left ); g_config.GetIni().SetValue( _W( "PlayerFrame"), _W( "FrameWndTop"), myRect.top ); g_config.GetIni().SetValue( _W( "PlayerFrame"), _W( "FrameWndRight"), myRect.right ); g_config.GetIni().SetValue( _W( "PlayerFrame"), _W( "FrameWndBottom"), myRect.bottom ); SaveBarState( _T( "PlayerFrmBarSettings" ) ); CFrameWnd::OnClose(); }
///////////////////////////////////////////////////////////////////////////// // CGuiMDIFrame message handlers //*********************************************************************** BOOL CGuiFrameWnd::DestroyWindow() { CWinApp* pApp = AfxGetApp(); TCHAR szSection[256]; wsprintf(szSection, _T("%s-Main"), sProfile); WINDOWPLACEMENT wp; GetWindowPlacement(&wp); pApp->WriteProfileString(szSection, NULL, NULL); pApp->WriteProfileInt(szSection, _T("left"), wp.rcNormalPosition.left); pApp->WriteProfileInt(szSection, _T("right"), wp.rcNormalPosition.right); pApp->WriteProfileInt(szSection, _T("bottom"), wp.rcNormalPosition.bottom); pApp->WriteProfileInt(szSection, _T("top"), wp.rcNormalPosition.top); pApp->WriteProfileInt(szSection, _T("status"), wp.showCmd); pApp->WriteProfileInt(szSection, _T("Style"),(int) GuiDrawLayer::m_Style); pApp->WriteProfileInt(szSection, _T("Theme"),(int) GuiDrawLayer::m_Theme); SaveBarState(sProfile); SavePosBar(sProfile); return CFrameWnd::DestroyWindow(); }
// When the window is destroy save all the environment // BOOL CMainFrame::DestroyWindow() { if( theApp.m_IsInGameMode ) theApp.ExitGameMode(); // Save bar position SaveBarState(_T("BarState")); m_wndObjectBar.SaveState(_T("DockBarState")); m_wndInfoBar.SaveState(_T("DockBarState")); // Save position of the main window; WINDOWPLACEMENT wndpl; GetWindowPlacement( &wndpl ); if( wndpl.rcNormalPosition.left>-30000 ) theApp.WriteProfileInt( _T("MainWindow"),_T("PosX"),wndpl.rcNormalPosition.left); if( wndpl.rcNormalPosition.top>-30000 ) theApp.WriteProfileInt( _T("MainWindow"),_T("PosY"),wndpl.rcNormalPosition.top); theApp.WriteProfileInt( _T("MainWindow"),_T("Width"),wndpl.rcNormalPosition.right-wndpl.rcNormalPosition.left); theApp.WriteProfileInt( _T("MainWindow"),_T("Height"),wndpl.rcNormalPosition.bottom-wndpl.rcNormalPosition.top); theApp.WriteProfileInt( _T("MainWindow"),_T("State"),wndpl.showCmd); return CMDIFrameWnd::DestroyWindow(); }
void CSearchDlg::OnClose() { SaveBarState(SEARCH_PARAMS_PROFILE); CFrameWnd::OnClose(); }
///////////////////////////////////////////////////////////////////////////// // CGuiMDIFrame message handlers //*********************************************************************** BOOL CGuiFrameWnd::DestroyWindow() { SaveBarState(sProfile); return CFrameWnd::DestroyWindow(); }
void CMainFrame::OnClose() { SaveBarState(_T("General")); CMDIFrameWnd::OnClose(); }
void CMainFrame::OnClose() { theApp.write_ini_file(); SaveBarState("Tools state"); CFrameWnd::OnClose(); }
void CMainFrame::OnClose() { SaveBarState( "DESKTOP" ) ; CMDIFrameWnd::OnClose(); }
void CTransferDlg::OnClose() { SaveBarState(DOWNLOAD_TOOLBAR_PROFILE); CFrameWnd::OnClose(); }