Freigeben über


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.

Hinweis

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

Reference

Using CHeaderCtrl