Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Click on a tab of a pane event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Click on a tab of a pane event

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


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Topic: Click on a tab of a pane event
    Posted: 03 November 2005 at 7:36am

Hi,

Is there a way to handle the event of clicking a tab item of a pane (in AutoHide mode) ?

Yoav.

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: 04 November 2005 at 12:05am

Here are some hints:

1. Override CXTPDockingPaneManager and its OnCreatePane:

class CDockingPaneManager : public CXTPDockingPaneManager
{
public:
 CDockingPaneManager();
 virtual ~CDockingPaneManager();

protected:
 virtual CXTPDockingPaneBase* OnCreatePane(XTPDockingPaneType type, CXTPDockingPaneLayout* pLayout);

};

 

2. if type == xtpPaneTypeAutoHidePanel return custom derived CXTPDockingPaneAutoHidePanel class.

3. catch  in csutom CDockingPaneAutoHidePanel its OnLButtonDown

void CDockingPaneAutoHidePanel::OnLButtonDown(UINT /*nFlags*/, CPoint point)
{
 CXTPDockingPane* pPane = HitTest(point);
 if (pPane)
 {
  if (m_pActiveWnd && m_pActiveWnd->m_pPane->GetSelected() == pPane)
  {
   pPane->SetFocus();

  } else
  {
   CloseActiveWindow();
   GetDockingPaneManager()->ShowPane(pPane );
  }
 }
}

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2005 at 7:33am

Hi Oleg,

I tried to follow your instructions, but I have problem in deriving from CXTPDockingPaneAutoHidePanel because its CTOR is private.

Can you advise ?

Yoav.

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: 07 November 2005 at 2:18am

I think you have quite old ToolkitPro version. In last versions it was protected.

Change your sources to make it protected and rebuild library

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