Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » How to Drag&Drop Page Container captions? Collapse All
Subject Author Date
Chris Thomas Aug 25, 2005 - 1:32 PM

Hello, I’m trying to modify the page container sample to support drag&drop captions. I’d like to be able to re-order the captions. Do you have some code for this, or could you point me at something I could base it on?

I’d really like to be able to drag&drop CDialogs, from CExtControlBar parents, into pages in a page container window, and drag&drop pages out to become floating bars again. But I have no idea how to make it interact with the rest of the docking system.

Technical Support Aug 26, 2005 - 12:13 PM

The CExtPageContainerWnd window does not implement a ready-to-use drag-and-drop algorithm but it has a built-in ability to detect when drag-and-drop starts when the user clicks a caption item and moves the mouse a bit. This is demonstrated in the PageContainer sample application. If you select the allow start drag-n-drop captions check box in the main view window and try to drag-and-drop the page caption, you will see the event notification message box. To enable drag-and-drop detection, please apply the __EPCWS_CAPTION_DRAG style with the CExtPageContainerWnd::ModifyPageContainerStyle() method and override the CExtPageContainerWnd::OnPageContainerStartCaptionDrag() virtual method as it is shown in the CDemoPageContainerWnd class of the PageContainer sample. The page container window has nothing to do with the resizable control bar implemented in the CExtControlBar class. To drag-and-drop pages is specific for each particular application. We are ready to discuss details of what you need to implement and provide you with advice or a ready-to-use solution.