Link to home
Start Free TrialLog in
Avatar of suresh030497
suresh030497

asked on

Splitter Window - SDI Aplication

Visual C++ 4.2
Single Document Interface(SDI) Application

Splitter Window

The panes in  a  static splitter window are only activated when the  left mousebutton is clicked on the particular view. The  menu items and toolbar buttons gets activated only when the particular view to which they are associated is in focus. How can the  menu items and toolbar buttons of a particular view  be activated  even when that view is not  having the focus.  

If in a  static splitter window with two panes a change in one view should cause an event to occur in the second view .How to communicate a changefrom one view to another.
Thanks
Suresh@salestalk.co.uk
Avatar of xbwen
xbwen

 Please check with the microsoft on-line example
  \sample\mfc\general\viewex, especily the splitter.cpp.
  Hope you can get what you want.

Avatar of suresh030497

ASKER


ASKER CERTIFIED SOLUTION
Avatar of rhgaracci
rhgaracci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you see the CFrameWnd::OnCmdMsg at winfrm.cpp, the frame only send the messgae to activeView. So you can overrid this function on derived frame window, than send all message to it's child view

CMyChildFrame::OnCmdMsg(.....)
{
    CChildView *pView;
    while(pView = GetChildView(...))
    {

}
If you see the CFrameWnd::OnCmdMsg at winfrm.cpp, the frame only send the messgae to activeView. So you can overrid this function on derived frame window, than send all message to it's child
view

CMyChildFrame::OnCmdMsg(.....)
{
    CChildView *pView;
    while(pView = GetChildView(...))
    {
         if (pView!= NULL && pView->OnCmdMsg(....))
             return TRUE;
    }
    .....
}

}