Print Page | Close Window

pPane->SetEnable ?

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=10886
Printed Date: 27 September 2024 at 4:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: pPane->SetEnable ?
Posted By: jimmy
Subject: pPane->SetEnable ?
Date 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




Replies:
Posted By: mgampi
Date 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


Posted By: jimmy
Date 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



Posted By: jimmy
Date 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



Posted By: mgampi
Date 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


Posted By: Oleg
Date 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


Posted By: jimmy
Date 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



Posted By: Oleg
Date Posted: 03 June 2008 at 2:32pm
hmm. I see your point now.

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


Posted By: jimmy
Date Posted: 04 June 2008 at 7:50am
Why there is EnableWindow(m_hWndChild) in OnSizeParent ?

  Jimmy




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