Exemplo n.º 1
0
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
	CGrannyViewerDoc* pDoc = GetDocument();
	if (pDoc) {
		CView* pView = pDoc->FindView(RUNTIME_CLASS(CGrannyViewerView));
		if (pView && pView->OnCmdMsg(nID,nCode,pExtra,pHandlerInfo)) return TRUE;
	}

	return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
Exemplo n.º 2
0
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
#if 0
	if (ID_EDIT_COPY != nID) {
		CView* pView = NULL;
		CGumpEditorDoc* pDoc = GetGumpDocument();
		if (pDoc) {
			pView = pDoc->FindView(RUNTIME_CLASS(CCodeView));
			if (pView && pView->OnCmdMsg(nID,nCode,pExtra,pHandlerInfo)) return TRUE;
		}
	}
#endif

	return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
Exemplo n.º 3
0
BOOL CFrameWnd::OnCmdMsg(UINT nID, int nCode)
{
	CView* pView = GetActiveView();
	if (pView->OnCmdMsg(nID, nCode))
	{
		return TRUE;
	}
	if (CWnd::OnCmdMsg(nID, nCode))
	{
		return TRUE;
	}
	CWinApp* pApp = AfxGetApp();
	if (pApp->OnCmdMsg(nID, nCode))
	{
		return TRUE;
	}
	return FALSE;
}
Exemplo n.º 4
0
BOOL CFrameWnd::OnCmdMsg( UINT nID, int nCode, void *pExtra,
                          AFX_CMDHANDLERINFO *pHandlerInfo )
/**********************************************************/
{
    CView *pView = GetActiveView();
    if( pView != NULL && pView->OnCmdMsg( nID, nCode, pExtra, pHandlerInfo ) ) {
        return( TRUE );
    }

    if( CWnd::OnCmdMsg( nID, nCode, pExtra, pHandlerInfo ) ) {
        return( TRUE );
    }

    CWinApp *pApp = AfxGetApp();
    if( pApp != NULL && pApp->OnCmdMsg( nID, nCode, pExtra, pHandlerInfo ) ) {
        return( TRUE );
    }
    return( FALSE );
}
Exemplo n.º 5
0
BOOL CFrameWnd::OnCmdMsg(UINT nID, int nCode)
{
    cout << "CFrameWnd::OnCmdMsg()" << endl;
    // pump through current view FIRST
    CView* pView = GetActiveView();
    if (pView->OnCmdMsg(nID, nCode))
            return TRUE;

    // then pump through frame
    if (CWnd::OnCmdMsg(nID, nCode))
            return TRUE;

    // last but not least, pump through app
    CWinApp* pApp = AfxGetApp();
    if (pApp->OnCmdMsg(nID, nCode))
            return TRUE;

    return FALSE;
}