BOOL CMDIChildWnd::DestroyWindow() /********************************/ { if( m_hWnd == NULL ) { return( FALSE ); } MDIDestroy(); return( TRUE ); }
void CGraphicWindowChildFrame::OnClose() { CMainFrame* pMF = VAWindow(); if( pMF && (pMF->CountGraphicViews() > 1) ) { MDIDestroy(); } else { if( theDocument && theDocument->CanClose() ) { SECMDIChildWnd::OnClose(); } } return; }
BOOL CMDIChildWnd::DestroyWindow() { if (m_hWnd==NULL) return FALSE; HWND hWndFrame=*GetMDIFrame(); DWORD dwStyle=::SetWindowLong(hWndFrame,GWL_STYLE,::GetWindowLong(hWndFrame,GWL_STYLE)); MDIDestroy(); if (::IsWindow(hWndFrame)) ::SetWindowLong(hWndFrame,GWL_STYLE,dwStyle); return TRUE; }
BOOL CMDIChildWnd::DestroyWindow() { if (m_hWnd == NULL) return FALSE; // avoid changing the caption during the destroy message(s) CMDIFrameWnd* pFrameWnd = GetMDIFrame(); HWND hWndFrame = pFrameWnd->m_hWnd; ASSERT(::IsWindow(hWndFrame)); DWORD dwStyle = SetWindowLong(hWndFrame, GWL_STYLE, GetWindowLong(hWndFrame, GWL_STYLE) & ~FWS_ADDTOTITLE); MDIDestroy(); if (::IsWindow(hWndFrame)) { ASSERT(hWndFrame == pFrameWnd->m_hWnd); SetWindowLong(hWndFrame, GWL_STYLE, dwStyle); pFrameWnd->OnUpdateFrameTitle(TRUE); } return TRUE; }
/// Document commanding us to close void CChildFrame::CloseNow() { SavePosition(); // Save settings before closing! MDIActivate(); MDIDestroy(); }
// Handle the WM_CLOSE messages. LRESULT BCChildWnd::OnClose() { // Destroy the window. MDIDestroy(); return 0; }