SAMPLE: MFCDRAG Implements Drag&Drop Between CListCtrl & CTreeLast reviewed: July 2, 1997Article ID: Q148738 |
The information in this article applies to:
SUMMARYMFCDRAG shows how to implement drag and drop between a CListCtrl and CTreeCtrl. The program creates a splitter window containing four panes. Two panes contain CListCtrls and the other two contain CTreeCtrls. You can drag an item from any window to another. For example, dragging can occur between the following panes:
CListCtrl to CTreeCtrl CListCtrl to CListCtrl CTreeCtrl to CListCtrl CTreeCtrl to CTreeCtrlCode marked with the comment "Added 7/29/96" was added to support a change in the CreateDragImage function in MFC 4.2. The CImageList pointer returned from CreateDragImage must now be explicitly deleted. If you are using a version of MFC prior to 4.2, please comment this code out. The following file is available for download from the Microsoft Software Library:
~ Mfcdrag.exe (size: 36508 bytes)For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online ServicesNOTE: Use the -d option when running MFCDRAG.EXE to decompress the file and recreate the proper directory structure.
|
Additional query words: drag drop
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |