Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Pin CXTPDockingPane Programmatically
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pin CXTPDockingPane Programmatically

 Post Reply Post Reply
Author
Message
AliRafiee View Drop Down
Groupie
Groupie


Joined: 06 May 2004
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote AliRafiee Quote  Post ReplyReply Direct Link To This Post Topic: Pin CXTPDockingPane Programmatically
    Posted: 17 October 2005 at 11:36pm

Hi Everyone,

I have an SDI application with a couple of CXTPDockingPanes.  What I am trying to do is pin down a pane programmatically , when the user want's to show a the pane that has been unpinned before, the reason is I when the pane is extended out it cannot block the main view (it is showing the a video), so I need to pin it so that it will resize the main view.

I am catching the XTP_DPN_ACTION, but don't know what to do there.

Thanks

Ali Rafiee



Edited by AliRafiee
Back to Top
AliRafiee View Drop Down
Groupie
Groupie


Joined: 06 May 2004
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote AliRafiee Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2005 at 12:07am

So far I have something working by doing this

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
....

 else if (wParam == XTP_DPN_ACTION)
 {
  XTP_DOCKINGPANE_ACTION* pAction = (XTP_DOCKINGPANE_ACTION*)lParam;
  if (pAction->action == xtpPaneActionExpanded)
  {
   if (pAction->pPane->GetDockingPaneManager()->IsPaneClo sed(pAction->pPane->GetID()) || pAction->pPane->GetDockingPaneManager()->IsPaneHidd en(pAction->pPane->GetID()))
   {
    m_paneManager.ToggleAutoHide(pAction ->pPane);
   }
   return TRUE;
  }
 }
....
}

 

If anyone has a better way, please let me know.

Back to Top
Barto View Drop Down
Groupie
Groupie


Joined: 27 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Barto Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2005 at 4:31am

what about just using ShowPane() to pin, HidePane() to unpin.

works for me :)

Back to Top
AliRafiee View Drop Down
Groupie
Groupie


Joined: 06 May 2004
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote AliRafiee Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2005 at 12:08pm

I tried ShowPane, but it did something weird, the pane was not pinned, and it wasn't floating either, it was kinda in mid-air.

 

Ali

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