Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 1.38 KB

providing-drag-and-drop-support-for-header-items.md

File metadata and controls

19 lines (14 loc) · 1.38 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Providing Drag-and-Drop Support for Header Items
Providing Drag-and-Drop Support for Header Items
11/04/2016
HDS_DRAGDROP style
header items in header controls
CHeaderCtrl class [MFC], drag and drop support
HDN_ notifications [MFC]
93a152ec-804f-488f-b260-b3a438d0dc0f

Providing Drag-and-Drop Support for Header Items

To provide drag-and-drop support for header items, specify the HDS_DRAGDROP style. Drag-and-drop support for header items gives the user the ability to reorder the header items of a header control. The default behavior provides a semitransparent drag image of the header item being dragged and a visual indicator of the new position, if the header item is dropped.

As with common drag-and-drop functionality, you can extend the default drag-and-drop behavior by handling the HDN_BEGINDRAG and HDN_ENDDRAG notifications. You can also customize the appearance of the drag image by overriding the CHeaderCtrl::CreateDragImage member function.

Note

If you are providing drag-and-drop support for an embedded header control in a list control, see the Extended Style section in the Changing List Control Styles topic.

See also

Using CHeaderCtrl