예제 #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;
}
예제 #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;
}
예제 #4
0
파일: winmdi.cpp 프로젝트: AeonAxan/mpc-hc
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;
}
예제 #5
0
/// Document commanding us to close
void CChildFrame::CloseNow()
{
	SavePosition(); // Save settings before closing!
	MDIActivate();
	MDIDestroy();
}
예제 #6
0
// Handle the WM_CLOSE messages.
LRESULT BCChildWnd::OnClose()
{
	// Destroy the window.
	MDIDestroy();
	return 0;
}