//////////////////////////////////////// /////////////////////////////////////
// Cframewnd command/message routing
Bool cframewnd: on1_msg (uint NID, int ncode, void * pextra,
Afx_cmdhandlerinfo * phandlerinfo)
{
Cpushroutingframe push (this );
// Pump through current view first
Cview * pview = getactiveview ();
If (pview! = NULL & pview-> on1_msg (NID, ncode, pextra, phandlerinfo ))
Return true;
// Then pump through frame
If (cwnd: on1_msg (NID, ncode, pextra, phandlerinfo ))
Return true;
// Last but not least, pump through app
Cwinapp * PAPP = afxgetapp ();
If (PAPP! = NULL & PAPP-> on1_msg (NID, ncode, pextra, phandlerinfo ))
Return true;
Return false;
}
// Command Routing
Bool cview: on1_msg (uint NID, int ncode, void * pextra,
Afx_cmdhandlerinfo * phandlerinfo)
{
// First pump through pane
If (cwnd: on1_msg (NID, ncode, pextra, phandlerinfo ))
Return true;
// Then pump through document
If (m_pdocument! = NULL)
{
// Special State for saving view before routing to document
Cpushroutingview push (this );
Return m_pdocument-> on1_msg (NID, ncode, pextra, phandlerinfo );
}
Return false;
}