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
Printed Date: 01 July 2022 at 10:30pm
Software Version: Web Wiz Forums 12.04 -

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?
    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 -

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

Oleg, Support Team

Print Page | Close Window

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