Print Page | Close Window

Disable stickers for undockable pane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2790
Printed Date: 08 November 2025 at 9:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Disable stickers for undockable pane
Posted By: Louis
Subject: Disable stickers for undockable pane
Date 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.




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



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



Posted By: Louis
Date 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;
             }

        }
    }
}




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