Print Page | Close Window

Let one pane act as a view?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=13827
Printed Date: 26 April 2024 at 10:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Let one pane act as a view?
Posted By: znakeeye
Subject: Let one pane act as a view?
Date 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/



Replies:
Posted By: Oleg
Date Posted: 30 March 2009 at 2:00am
Hi,
Yes, guess its right solution.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net