Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - pPane->SetEnable ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

pPane->SetEnable ?

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: pPane->SetEnable ?
    Posted: 03 June 2008 at 5:31am
Hello,

Is there a way to disable only the Child Window of a pane and not the pane.

SetEnable(xtpPaneEnableActions) or SetEnable(xtpPaneDisable)
does not work for this.

also chang enum variable m_bEnable to m_eEnable.

i use v11.1.3

  Jimmy

Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 5:42am
Hi;
I did it by just calling GetChild->EnableWindow().
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 5:56am
Yes, i also do this, but on some action (save our project change title of a View ) the pane manager get a OnSizeParent, and in this function, the pane manager enable the child.

  Jimmy

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 6:20am
My solution

class CExXTPDockingPane : public CXTPDockingPane
{
public:
    CExXTPDockingPane(CXTPDockingPaneLayout* pLayout) : CXTPDockingPane(pLayout)
    { }
    virtual void OnSizeParent(CWnd* pParent, CRect rect, LPVOID lParam)
    {
        if (GetChild() == NULL || GetChild()->IsWindowEnabled())
        {
            __super::OnSizeParent(pParent, rect, lParam);
            return;
        }
        // Child is Disabled
        // Save current state
        XTPXTPDockingPaneEnableOptions eSave = m_bEnabled;
        m_bEnabled = xtpPaneEnableActions;
        __super::OnSizeParent(pParent, rect, lParam);
        m_bEnabled = eSave;
    }
};

  Jimmy

Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 6:27am
Hi;
I believe that enabling the pane in OnSizeParent() is definitely a bug. I would report this to codejock support... 
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
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: 03 June 2008 at 9:16am
Hi,
 
Actually I think SetEnable(xtpPaneEnableActions)  have to work.   At least you can try
 
SetEnable(xtpPaneEnableActions)  + GetChild->EnableWindow
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 9:57am
Hi Oleg,

But SetEnable(xtpPaneEnableActions) will not work correct.
Panes will get gray (disable) , and i can't switch between Panes.

  Jimmy

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: 03 June 2008 at 2:32pm
hmm. I see your point now.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2008 at 7:50am
Why there is EnableWindow(m_hWndChild) in OnSizeParent ?

  Jimmy

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.156 seconds.