Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Disable stickers for undockable pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Disable stickers for undockable pane

 Post Reply Post Reply
Author
Message
Louis View Drop Down
Newbie
Newbie


Joined: 17 August 2005
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Topic: Disable stickers for undockable pane
    Posted: 25 August 2005 at 4:13pm

Hi,

I have an application that has docking panes and I want to be able to disallow docking for specific panes. I wass think of doing this when a pane is floated that pin button will act as a enable/disable docking. I think this is easy and found a sample that shows how. But, I also want stickers to NOT show when I start dragging a floated pane that has been pined (disallowed to dock). How can I do that ?

Louis.

Back to Top
g_j_a_i_n View Drop Down
Groupie
Groupie
Avatar

Joined: 27 August 2005
Status: Offline
Points: 94
Post Options Post Options   Thanks (0) Thanks(0)   Quote g_j_a_i_n Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2005 at 10:43pm


Sorry. I have come here not to provide a solution. But to ask you another question.

How can I disable docking of certain panes? I want to keep it always floating.

Regards,
Gautam Jain

Back to Top
Hazelnut View Drop Down
Groupie
Groupie
Avatar

Joined: 22 July 2005
Location: United States
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hazelnut Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2005 at 11:24pm

For the first question,

Look in XTPDockingPaneDefines.h ... it seems to have some options.

xtpPaneNoCloseable, xtpPaneNoHideable,xtpPaneNoFloatable,xtpPaneNoCaption, xtpPaneHasMenuButton

For the second question and possibly the first too, search for  XTP_DOCKINGPANE_ACTION in the same file. It seems you'll have to watch for these actions and act on accordingly during the XTPWM_DOCKINGPANE_NOTIFY notification.

Back to Top
Louis View Drop Down
Newbie
Newbie


Joined: 17 August 2005
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2005 at 8:14am

Here's what I am doing right now. This also answers g_j_a_i_n question.

I still need a way to disable stickers, so that they don't show up for panes that cannot be docked.

To prevent a pane to dock, you need the message handler:
ON_MESSAGE(XTPWM_DOCKINGPANE_NOTIFY, OnDockingPaneNotify) in your message map.

Then, in the handler itself you need to check for XTP_DPN_ACTION.

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
    
if( wParam == XTP_DPN_ACTION )
    {
        XTP_DOCKINGPANE_ACTION* pAction = (XTP_DOCKINGPANE_ACTION*)lParam;

        //Do not allow this pane to dock
        
if( pAction->action == xtpPaneActionDocking || pAction->action == xtpPaneActionAttaching )
        {
             int nPaneID = pAction->pPane->GetID();
             if( nPaneID == MyPaneID )
             {
                 pAction->bCancel = TRUE;
                
return TRUE;
             }

        }
    }
}

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