![]() |
Let one pane act as a view? |
Post Reply ![]() |
Author | |
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() Posted: 27 March 2009 at 2:56am |
In SDI applications you derive one window from CWnd and always let it have a crack at the command in OnCmdMsg. What's the proper way of assigning one pane to act as an active view? That is, one pane should be "in charge" of the other panes.It's just a matter of design. In a defined pane layout, I want certain commands to be available when one of several panes is active. Your samples only show how to let the active pane have a crack at the command.
Is this the right approach?
CMainFrame::OnCmdMsg(...)
{
if (m_paneMyView.OnCmdMsg(...))
return TRUE;
CWnd *pWnd = m_paneManager.GetActiveWindowPane();
if (pWnd && pWnd != &m_paneMyView)
{
if (pWnd->OnCmdMsg(...);
return TRUE;
}
}
I'm not sure how to handle the active view since I do not use the Doc/View architecture. I suppose I could store an "active pane"-pointer for this purpose.
What do you think?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Yes, guess its right solution.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |