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
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
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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(...))
{
}
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;
}
.....
}
}
view
CMyChildFrame::OnCmdMsg(..
{
CChildView *pView;
while(pView = GetChildView(...))
{
if (pView!= NULL && pView->OnCmdMsg(....))
return TRUE;
}
.....
}
}
\sample\mfc\general\viewex
Hope you can get what you want.