Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - PaneActions sample in v9.51
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PaneActions sample in v9.51

 Post Reply Post Reply
Author
Message
Maye Johnson View Drop Down
Groupie
Groupie


Joined: 16 October 2004
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maye Johnson Quote  Post ReplyReply Direct Link To This Post Topic: PaneActions sample in v9.51
    Posted: 24 November 2004 at 1:01am
I've played around with the PaneActions sample in XTP v9.51 and believe there is a serious bug.  If you have a  pane open, don't want the user to be able to move the pane, but want the autohide feature enabled,  I would think you  set xtpPaneNoFloatable to prevent moving.  I do this, yet you can still move the pane around.  If I set it to cancel xtpPaneActionDocking, then regardless of the float state, the user can't move it.  However, when you hide the pane, if you make it pop back up and try to pin it, it won't pin.  It stays visible, but if you minimize the app and restore it, then the pane is hidden.
Back to Top
Maye Johnson View Drop Down
Groupie
Groupie


Joined: 16 October 2004
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maye Johnson Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2004 at 1:17am
I worked around it by tracking the state of pinned with the following code:


 m_bAllowToolboxDock = FALSE;  // initialized to FALSE

LRESULT CSimFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
    if (wParam == XTP_DPN_SHOWWINDOW)
    {
    }
    else if (wParam == XTP_DPN_ACTION)
    {
        XTP_DOCKINGPANE_ACTION*    pAction = (XTP_DOCKINGPANE_ACTION*) lParam;

        if (pAction->pPane->GetID() == ID_TOOLBOX_PANE)
        {
            if (pAction->action == xtpPaneActionPinned)
                m_bAllowToolboxDock = TRUE;

            if (pAction->action == xtpPaneActionDocking)
            {
                if (!m_bAllowToolboxDock)
                    pAction->bCancel = TRUE;
                else
                    m_bAllowToolboxDock = FALSE;
            }
        }

        return TRUE;
    }

    return FALSE;
}


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