Ejemplo n.º 1
0
void CMouse::EventCallback(MpcEvent ev)
{
    CPoint screenPoint;
    VERIFY(GetCursorPos(&screenPoint));
    switch (ev) {
        case MpcEvent::SWITCHED_TO_FULLSCREEN:
        case MpcEvent::SWITCHED_TO_FULLSCREEN_D3D:
            m_switchingToFullscreen.first = false;
            break;
        case MpcEvent::SWITCHING_TO_FULLSCREEN:
        case MpcEvent::SWITCHING_TO_FULLSCREEN_D3D:
            m_switchingToFullscreen = std::make_pair(true, screenPoint);
        // no break
        case MpcEvent::MEDIA_LOADED:
            if (CursorOnWindow(screenPoint, GetWnd())) {
                SetCursor(screenPoint);
            }
            break;
        case MpcEvent::CONTEXT_MENU_POPUP_UNINITIALIZED:
            m_popupMenuUninitTime = GetMessageTime();
            break;
        case MpcEvent::SYSTEM_MENU_POPUP_INITIALIZED:
            if (!GetCapture() && CursorOnWindow(screenPoint, GetWnd())) {
                ::SetCursor(m_cursors[Cursor::ARROW]);
            }
            break;
        default:
            ASSERT(FALSE);
    }
}
Ejemplo n.º 2
0
		void Application::Run()
		{
			bool finished = false;

			while( !finished )
			{
				// Check for messages and process if any.
				while( !finished && GetWnd()->HasMessages() )
				{
					if( !GetWnd()->Pump() )
					{
						finished = true;
					}
				}
				
				if( m_isActive )
				{
					DoFrame();
				}
				else
				{
					DoIdleFrame();
				}
			}
		}
Ejemplo n.º 3
0
void CMouse::SetCursor(const CPoint& screenPoint)
{
    ASSERT(CursorOnWindow(screenPoint, GetWnd()));
    CPoint clientPoint(screenPoint);
    GetWnd().ScreenToClient(&clientPoint);
    SetCursor(GetMouseFlags(), screenPoint, clientPoint);
}
Ejemplo n.º 4
0
		void Application::InitPrimaryWindow()
		{
			new Window( m_title, m_wndWidth, m_wndHeight );

			GetWnd()->RegisterClass();
			GetWnd()->InitInstance();
		}
Ejemplo n.º 5
0
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 播放窗口回调函数
LRESULT CALLBACK CChildWnd::PlayWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch (uMsg)
	{
	case WM_CONTEXTMENU:
		// 弹出上下文菜单
		TrackPopupMenu(CClientWnd::m_hPopup, 0, LOWORD(lParam), HIWORD(lParam), 0, GetParent(hWnd), NULL);
		break;

	case WM_ERASEBKGND:
		_Assert(GetWnd(hWnd));
		if (GetWnd(hWnd)->IsPlaying() == FALSE)
		{
			GetWnd(hWnd)->Draw((HDC) wParam);
		}
		return TRUE;

	case WM_COMMAND:
		GetWnd(hWnd)->OnCommand(wParam, lParam);
		return 0;

	case WM_LBUTTONDOWN:
		ShowWindow(GetWnd(hWnd)->m_hEditBox, SW_HIDE);
		//GetWnd(hWnd)->StepFrame((wParam & MK_CONTROL) ? -1 : 1);
		break;
	}

	return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
void CPropPageFrame::SafeUpdateWindow(LPCRECT lpRect /* = NULL */)
{
	if (!IsWindow(GetWnd()->GetSafeHwnd()))
		return;

	GetWnd()->InvalidateRect(lpRect, TRUE);
}
CRect CPropPageFrame::CalcMsgArea()
{
	ASSERT(IsWindow(GetWnd()->GetSafeHwnd()));

	CRect	rectMsg;
	GetWnd()->GetClientRect(rectMsg);
	if (GetShowCaption())
		rectMsg.top+= GetCaptionHeight();

	return rectMsg;
}
Ejemplo n.º 8
0
// Left button
void CMouse::InternalOnLButtonDown(UINT nFlags, const CPoint& point)
{
    GetWnd().SetFocus();
    m_bLeftDown = false;
    SetCursor(nFlags, point);
    if (MVRDown(nFlags, point)) {
        return;
    }
    bool bIsOnFS = IsOnFullscreenWindow();
    if ((!m_bD3DFS || !bIsOnFS) && (abs(GetMessageTime() - m_popupMenuUninitTime) < 2)) {
        return;
    }
    if (m_pMainFrame->GetLoadState() == MLS::LOADED && m_pMainFrame->GetPlaybackMode() == PM_DVD &&
            (m_pMainFrame->IsD3DFullScreenMode() ^ m_bD3DFS) == 0 &&
            (m_pMainFrame->m_pDVDC->ActivateAtPosition(GetVideoPoint(point)) == S_OK)) {
        return;
    }
    if (m_bD3DFS && bIsOnFS && m_pMainFrame->m_OSD.OnLButtonDown(nFlags, point)) {
        return;
    }
    m_bLeftDown = true;
    bool bDouble = false;
    if (m_bLeftDoubleStarted &&
            GetMessageTime() - m_leftDoubleStartTime < (int)GetDoubleClickTime() &&
            CMouse::PointEqualsImprecise(m_leftDoubleStartPoint, point)) {
        m_bLeftDoubleStarted = false;
        bDouble = true;
    } else {
        m_bLeftDoubleStarted = true;
        m_leftDoubleStartTime = GetMessageTime();
        m_leftDoubleStartPoint = point;
    }
    auto onButton = [&]() {
        GetWnd().SetCapture();
        bool ret = false;
        if (bIsOnFS || !m_pMainFrame->IsCaptionHidden()) {
            ret = OnButton(wmcmd::LDOWN, point, bIsOnFS);
        }
        if (bDouble) {
            ret = OnButton(wmcmd::LDBLCLK, point, bIsOnFS) || ret;
        }
        if (!ret) {
            ReleaseCapture();
        }
        return ret;
    };
    m_drag = (!onButton() && !bIsOnFS) ? Drag::BEGIN_DRAG : Drag::NO_DRAG;
    if (m_drag == Drag::BEGIN_DRAG) {
        GetWnd().SetCapture();
        m_beginDragPoint = point;
        GetWnd().ClientToScreen(&m_beginDragPoint);
    }
}
CRect	CPropPageFrame::CalcCaptionArea()
{
	ASSERT(IsWindow(GetWnd()->GetSafeHwnd()));

	CRect	rectCaption;
	GetWnd()->GetClientRect(rectCaption);
	if (!GetShowCaption())
		rectCaption.bottom = rectCaption.top;
	else
		rectCaption.bottom = rectCaption.top+GetCaptionHeight();

	return rectCaption;
}
Ejemplo n.º 10
0
/*-------------------------------------------------------------------
CVSplitter::MoveWin
スプリッターを移動させる
-------------------------------------------------------------------*/
bool CVSplitter::MoveWin(int x,int y,int nWidth,int nHeight){
	FOOTY2_PRINTF( L"MoveWin y=%d, nHeight=%d\n", y, nHeight );
	/*エラーチェック*/
	if (x <= 0 || m_nBaseWidth < x)return false;
	if (nHeight < y)return false;
	/*アタッチされたビューを移動させる*/
	if (m_pViews){
		FOOTY2_PRINTF( L"MoveWinOK y=%d, nHeight=%d\n", y, nHeight );
		if (m_nMode == SPLIT_DUAL){
			m_pViews[0].MoveWin(m_nBaseX,m_nBaseY,x-m_nBaseX,nHeight);
			m_pViews[1].MoveWin(x+SPLIT_SIZE,m_nBaseY,nWidth-(x-m_nBaseX)-SPLIT_SIZE,nHeight);
			FOOTY2_PRINTF( L"MoveWinD y=%d, nHeight=%d\n", y, nHeight );
		}
		else if (m_pOtherSplit){
			m_pViews[0].MoveWin(m_nBaseX,y,x-m_nBaseX,m_pOtherSplit->GetY()-y);
			m_pViews[1].MoveWin(x+SPLIT_SIZE,y,nWidth-x-SPLIT_SIZE,m_pOtherSplit->GetY()-y);
			m_pViews[2].MoveWin(m_nBaseX,m_pOtherSplit->GetY()+SPLIT_SIZE,
				x-m_nBaseX,nHeight-(m_pOtherSplit->GetY()-y)-SPLIT_SIZE);
			m_pViews[3].MoveWin(x+SPLIT_SIZE,m_pOtherSplit->GetY()+SPLIT_SIZE,
				nWidth-x-SPLIT_SIZE,nHeight-(m_pOtherSplit->GetY()-y)-SPLIT_SIZE);
			FOOTY2_PRINTF( L"MoveWinQ y=%d, nHeight=%d\n", y, nHeight );
		}
	}
	/*スプリットバーを移動させる*/
	MoveWindow(GetWnd(),x,y,SPLIT_SIZE,nHeight,true);
	/*メンバ変数を代入*/
	m_x = x;
	m_y = y;
	return true;
}
Ejemplo n.º 11
0
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 通知消息
VOID CChildWnd::OnNotify(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch ((uMsg == WM_NOTIFY)	? ((LPNMHDR) lParam)->code : uMsg)
	{
	case TTN_NEEDTEXT:
		// 显示工具栏提示
		GetMenuString(CMainWnd::m_hMenu, (UINT) wParam, ((LPTOOLTIPTEXT) lParam)->szText, 80, MF_BYCOMMAND);

	case WM_MENUSELECT:
		// 在状态栏显示相应的菜单项提示
		CLanguage::TranslateString(LOWORD(wParam));
		if (CLanguage::m_tzText[0])
		{
			SetStatusText(hWnd, CLanguage::m_tzText);
			break;
		}

	case TTN_POP:
	case WM_EXITMENULOOP:
		// 在状态栏显示“就绪”
		SetStatusText(hWnd, LNG_Ready);
		break;

	case NM_CLICK:
		if (((LPNMHDR) lParam)->idFrom == IDC_StatusBar)
		{
			GetWnd(hWnd)->OnClickStatusBar((UINT) ((LPNMMOUSE) lParam)->dwItemSpec);
		}
		break;
	}
}
Ejemplo n.º 12
0
LRESULT CALLBACK GameWnd::WndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
	switch( uMsg )
	{
	case WM_CLOSE:
		{
			DestroyWindow( GetWnd().m_Hwnd );
		}
		break;
	case WM_DESTROY:
		{
			PostQuitMessage( 0 );
		}
		break;
	default:
		{
			for( Input_HandlersIter it = s_InputHandlers.begin(); it != s_InputHandlers.end(); it++ )
			{
				Input* pInput = *it;
				if( pInput != NULL )
				{
					pInput->HandleInput( uMsg, wParam, lParam );
				}
			}
			return DefWindowProc( hwnd, uMsg, wParam, lParam );
		}
		break;
	}
	return 0;
}
Ejemplo n.º 13
0
/*-------------------------------------------------------------------
CHSplitter::MoveWin
スプリッターを移動させる
-------------------------------------------------------------------*/
bool CHSplitter::MoveWin(int x,int y,int nWidth,int nHeight){
	/*エラーチェック*/
	if (y <= 0 || m_nBaseHeight < y)return false;
	/*アタッチされたウィンドウを移動させる*/
	if (m_pViews){
		if (m_nMode == SPLIT_DUAL){
			m_pViews[0].MoveWin(x,m_nBaseY,nWidth,y-m_nBaseY);
			m_pViews[1].MoveWin(x,y+SPLIT_SIZE,nWidth,nHeight-(y-m_nBaseY)-SPLIT_SIZE);
		}
		else if (m_pOtherSplit){
			//m_pViews[0].MoveWin(x,m_nBaseY,m_pOtherSplit->GetX(),y-m_nBaseY);
			m_pViews[0].MoveWin(x,m_nBaseY,m_pOtherSplit->GetX()-x,y-m_nBaseY);// バグ修正 by Tetr@pod
			m_pViews[1].MoveWin(m_pOtherSplit->GetX()+SPLIT_SIZE,m_nBaseY,
				nWidth-m_pOtherSplit->GetX()-SPLIT_SIZE,y-m_nBaseY);
			//m_pViews[2].MoveWin(x,y+SPLIT_SIZE,m_pOtherSplit->GetX(),m_nBaseHeight-(y-m_nBaseY)-SPLIT_SIZE);
			m_pViews[2].MoveWin(x,y+SPLIT_SIZE,m_pOtherSplit->GetX()-x,m_nBaseHeight-(y-m_nBaseY)-SPLIT_SIZE);// バグ修正 by Tetr@pod
			m_pViews[3].MoveWin(m_pOtherSplit->GetX()+SPLIT_SIZE,y+SPLIT_SIZE,
				nWidth-m_pOtherSplit->GetX()-SPLIT_SIZE,m_nBaseHeight-(y-m_nBaseY)-SPLIT_SIZE);
		}
	}
	/*スプリットバーを移動させる*/
	MoveWindow(GetWnd(),x,y,nWidth,SPLIT_SIZE,true);
	/*メンバ変数を代入*/
	m_x = x;
	m_y = y;
	return true;
}
Ejemplo n.º 14
0
void CCursor::Update()
{
    POINT pt;
    GetCursorPos(&pt);
    extern HWND GetWnd();
    ScreenToClient(GetWnd(), &pt);
    m_Position.Set(pt.x, pt.y);
}
Ejemplo n.º 15
0
	bool EngineApp::OnInit()
	{

		m_pCore = CoreApiPtr(new CoreApi);

		SysSetting setting;
		setting.graphics.sysMod = L"./d11graphics.dll";
		setting.graphics.backBufferCount = 2;
		setting.graphics.depthStencilFormat = G_FORMAT_D24_UNORM_S8_UINT;
		setting.graphics.frameBufferFormat = G_FORMAT_R8G8B8A8_UNORM;
		setting.graphics.frameBufferHeight = GetClientHeight();
		setting.graphics.frameBufferWidth = GetClientWidth();
		setting.graphics.multiSampleCount = 1;
		setting.graphics.multiSampleQuality = 0;
		setting.graphics.windowed = true;
		setting.graphics.wnd = GetWnd();

		setting.input.sysMod = L"";
		setting.input.wnd = GetWnd();

		setting.sound.maxChannels = 100;
		setting.sound.sysMod = L"./fmod_sound.dll";

		setting.physics.sysMod = L"";

		if(false == m_pCore->Initialize(setting))
		{
			return false;
		}
		
		m_pGameManager = m_pCore->GetAllocator()->AllocObject<GameManager>();

		if(false == m_pGameManager->Initialize(L"./game.dll"))
		{
			return false;
		}

		if(false == m_pGameManager->GetGame()->Initialize(m_pCore))
		{
			return false;
		}

		return true;
	}
Ejemplo n.º 16
0
void CMouse::MVRMove(UINT nFlags, const CPoint& point)
{
    if (UsingMVR()) {
        CPoint mappedPoint(point);
        MapWindowPoints(GetWnd(), m_pMainFrame->m_hWnd, &mappedPoint, 1);
        WPARAM wp = nFlags;
        LPARAM lp = MAKELPARAM(mappedPoint.x, mappedPoint.y);
        m_pMainFrame->SendMessage(WM_MOUSEMOVE, wp, lp);
    }
}
Ejemplo n.º 17
0
void CMouse::StartMouseLeaveTracker()
{
    ASSERT(!m_pMainFrame->IsInteractiveVideo());
    TRACKMOUSEEVENT tme = { sizeof(tme), TME_LEAVE, GetWnd() };
    if (TrackMouseEvent(&tme)) {
        m_bTrackingMouseLeave = true;
    } else {
        ASSERT(FALSE);
    }
}
Ejemplo n.º 18
0
bool CMouse::MVRUp(UINT nFlags, const CPoint& point)
{
    bool ret = false;
    if (UsingMVR()) {
        CPoint mappedPoint(point);
        MapWindowPoints(GetWnd(), m_pMainFrame->m_hWnd, &mappedPoint, 1);
        WPARAM wp = nFlags;
        LPARAM lp = MAKELPARAM(mappedPoint.x, mappedPoint.y);
        ret = (m_pMainFrame->SendMessage(WM_LBUTTONUP, wp, lp) != 42);
    }
    return ret;
}
Ejemplo n.º 19
0
int CWindowListDlg::MyFind(CWnd* pWnd)
{
	int nCount = m_ctlWindowList.GetItemCount();

	for (int i = 0; i < nCount; ++i)
	{
		if (GetWnd(i) == pWnd)
		{
			return i;
		}
	}

	return -1; // didn't find it.
}
Ejemplo n.º 20
0
void CMouse::InternalOnMouseMove(UINT nFlags, const CPoint& point)
{
    CPoint screenPoint(point);
    GetWnd().ClientToScreen(&screenPoint);

    if (!TestDrag(screenPoint) && !m_pMainFrame->IsInteractiveVideo()) {
        if (!m_bTrackingMouseLeave) {
            StartMouseLeaveTracker();
        }
        SetCursor(nFlags, screenPoint, point);
        MVRMove(nFlags, point);
    }

    m_pMainFrame->UpdateControlState(CMainFrame::UPDATE_CONTROLS_VISIBILITY);
}
Ejemplo n.º 21
0
void CWindowListDlg::Close(CWnd* pWnd)
{
	int nIndex = MyFind(pWnd);
	
	if (nIndex == -1)
	{
	//	ASSERT(nIndex != -1);
		return;
	}

	int nIcon = GetIconByWindowType(GetWnd(nIndex));

	if (nIcon != eSearch)
	{
		unsigned long nBit = 1;;
		nBit <<= nIcon;
		m_Slots &= ~nBit;
	}
	m_ctlWindowList.DeleteItem(nIndex);
}
Ejemplo n.º 22
0
void CWindowListDlg::OnSelchangeWindowTabs(NMHDR* pNMHDR, LRESULT* pResult) 
{
	CWnd* pWnd = GetWnd(m_ctlWindowList.GetCurSel());

	if (IsWindow(pWnd->m_hWnd))
	{
		WINDOWPLACEMENT placement = { sizeof(WINDOWPLACEMENT) };

		pWnd->GetWindowPlacement(&placement);

		if (placement.showCmd == SW_HIDE || 
			placement.showCmd == SW_MINIMIZE ||
			placement.showCmd == SW_SHOWMINIMIZED)
		{
			pWnd->ShowWindow(SW_SHOWNORMAL);
		}
		pWnd->BringWindowToTop();
	}
	
	*pResult = 0;
}
BOOL CFlownetController::HitComponent(UINT nFlags, CPoint ptLog, int nButton) 
{
	BOOL isHit = CODController::HitComponent(nFlags, ptLog, nButton);
	
	CFlownetComponent* pHit = (CFlownetComponent*) m_pCompHit;

// HvdW 18/12/2001:
// The following lines have been removed after we have changed the pipes from links to components.
// This was done so the property pages will be properly removed when links or secondary elements are selected.
/*	if ( (pHit != 0) && (pHit->GetUserData() == 0) ) // hit a component with no user data
		return isHit;
	
	if ( ((pHit != 0) && !pHit->IsKindOf(RUNTIME_CLASS(CODSymbolComponent))) || pHit == 0)  // hit a component that is not a symbol such as a text item
	{
		m_wndWorkspace.ReloadPropSheetsData(this, 0);  // no element with user data selected
		GetWnd()->SetFocus();  // set the focus back to the viewport, as ReloadPropSheetsData will put the focus on the propsheets.  If the focus is not set back to the viewport, one will have to select a component twice (to get the focus on the component) before the delete key will work
		return isHit;
	}*/
	
	m_wndWorkspace.ReloadPropSheetsData(this, m_pCompHit);
	GetWnd()->SetFocus();  // set the focus back to the viewport, as ReloadPropSheetsData will put the focus on the propsheets.  If the focus is not set back to the viewport, one will have to select a component twice (to get the focus on the component) before the delete key will work
	return isHit;
}
Ejemplo n.º 24
0
void CWindowListDlg::OnContextMenu(CWnd*, CPoint point) 
{
	CPoint ptClient(point);
	m_ctlWindowList.ScreenToClient(&ptClient);

	TCHITTESTINFO info;
	info.flags = TCHT_ONITEM;
	info.pt = ptClient;

	int nIndex = m_ctlWindowList.HitTest(&info);

	CWnd* pWnd = NULL;
	if (nIndex != -1)
	{
		CMenu menu;
		menu.LoadMenu(IDR_WNDLIST_RCLICK);
		CMenu *pMenu = menu.GetSubMenu(0);
		ASSERT(pMenu != NULL);

		WINDOWPLACEMENT placement = { sizeof(WINDOWPLACEMENT) };
		pWnd = GetWnd(nIndex);
		pWnd->GetWindowPlacement(&placement);

		if (placement.showCmd == SW_HIDE)
		{
			menu.EnableMenuItem(ID_WNDLIST_CLOSE, MF_BYCOMMAND | MF_GRAYED);
		}
		else if (placement.showCmd == SW_SHOWMAXIMIZED)
		{
			menu.EnableMenuItem(ID_WNDLIST_MAX,   MF_BYCOMMAND | MF_GRAYED);
		}
		else if (placement.showCmd == SW_SHOWMINIMIZED)
		{
			menu.EnableMenuItem(ID_WNDLIST_MIN,   MF_BYCOMMAND | MF_GRAYED);
		}
		else if (m_ctlWindowList.GetCurSel() == nIndex)
		{
			menu.EnableMenuItem(ID_WNDLIST_SHOW,  MF_BYCOMMAND | MF_GRAYED);
		}
		pWnd->GetWindowPlacement(&placement);

		int res = pMenu->TrackPopupMenu( (TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD),
					 point.x, point.y, this);

		switch(res)
		{
		case ID_WNDLIST_CLOSE:
			pWnd->PostMessage(WM_CLOSE);
			break;
		case ID_WNDLIST_MAX:
			placement.showCmd = SW_SHOWMAXIMIZED;
			pWnd->SetWindowPlacement(&placement);
			break;
		case ID_WNDLIST_MIN:
			placement.showCmd = SW_SHOWMINIMIZED;
			pWnd->SetWindowPlacement(&placement);
			break;
		case ID_WNDLIST_SHOW:
			pWnd->ShowWindow(SW_SHOWNORMAL);
			pWnd->BringWindowToTop();
			break;
		}
	}
}
Ejemplo n.º 25
0
void CMouse::SetCursor(UINT nFlags, const CPoint& clientPoint)
{
    CPoint screenPoint(clientPoint);
    GetWnd().ClientToScreen(&screenPoint);
    SetCursor(nFlags, screenPoint, clientPoint);
}
Ejemplo n.º 26
0
void CMouse::StopMouseLeaveTracker()
{
    TRACKMOUSEEVENT tme = { sizeof(tme), TME_LEAVE | TME_CANCEL, GetWnd() };
    TrackMouseEvent(&tme);
    m_bTrackingMouseLeave = false;
}
Ejemplo n.º 27
0
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 子窗口回调函数
LRESULT CALLBACK CChildWnd::ClildWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	CChildWnd *pThis;
	LPMDICREATESTRUCT pmcsCreate;

	switch (uMsg)
	{
	case WM_CREATE:
		// 获取 this 指针
		_Assert(lParam);
		pmcsCreate = (LPMDICREATESTRUCT) ((LPCREATESTRUCT) lParam)->lpCreateParams;
		_Assert(pmcsCreate);
		pThis = (CChildWnd *) pmcsCreate->lParam;
		_Assert(pThis);		
		pThis->m_hWnd = hWnd;
		pThis->OnCreate();
		break;

	case WM_WINDOWPOSCHANGED:
		// 位置改变
		GetWnd(hWnd)->SetDrawRect();
		break;

	case WM_SIZE:
		// 尺寸改变
		if (wParam != SIZE_MINIMIZED)
		{
			_Assert(GetWnd(hWnd));
			GetWnd(hWnd)->OnSize(wParam, lParam);
		}
		break;

	case WM_INITMENUPOPUP:
		if (GetMenuItemID((HMENU) wParam, 0) == IDM_Play_Play)
		{
			GetWnd(hWnd)->OnMenuPopup();
		}
		break;

	case WM_NOTIFY:
	case WM_MENUSELECT:
	case WM_EXITMENULOOP:
		// 设置工具栏和状态栏提示信息
		OnNotify(hWnd, uMsg, wParam, lParam);
		break;

	case WM_COMMAND:
		// 命令消息
		GetWnd(hWnd)->OnCommand(wParam, lParam);
		break;

	case WM_KILLFOCUS:
		// 取消
		_ExIf(GetWnd(hWnd)->m_bExporting, SetFocus(hWnd));
		break;

	case WM_KEYDOWN:
		// 取消
		_ExIf(wParam == VK_ESCAPE, GetWnd(hWnd)->m_bCancel = TRUE);
		break;

	case WM_NCDESTROY:
		// 窗口销毁
		CClientWnd::OnChildOpenClose();
		_Assert(GetWnd(hWnd));
		delete GetWnd(hWnd);
		break;
	}

	return DefMDIChildProc(hWnd, uMsg, wParam, lParam);
}