Example #1
0
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;
}
Example #3
0
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;
}
Example #4
0
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;
}
Example #5
0
/// Document commanding us to close
void CChildFrame::CloseNow()
{
	SavePosition(); // Save settings before closing!
	MDIActivate();
	MDIDestroy();
}
Example #6
0
// Handle the WM_CLOSE messages.
LRESULT BCChildWnd::OnClose()
{
	// Destroy the window.
	MDIDestroy();
	return 0;
}