Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Let one pane act as a view?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Let one pane act as a view?

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Let one pane act as a view?
    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/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2009 at 2:00am
Hi,
Yes, guess its right solution.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.