共用方式為


CHeaderCtrl::CreateDragImage

Creates a transparent version of an item's image within a header control.

CImageList* CreateDragImage(
   int nIndex 
);

Parameters

  • nIndex
    The zero-based index of the item within the header control. The image assigned to this item is the basis for the transparent image.

Return Value

A pointer to a CImageList object if successful; otherwise NULL. The returned list contains only one image.

Remarks

This member function implements the behavior of the Win32 message HDM_CREATEDRAGIMAGE, as described in the Windows SDK. It is provided to support header item drag and drop.

The CImageList object to which the returned pointer points is a temporary object and is deleted in the next idle-time processing.

Requirements

Header: afxcmn.h

See Also

Concepts

CHeaderCtrl Class

CHeaderCtrl Members

Hierarchy Chart

CHeaderCtrl::GetImageList

CHeaderCtrl::SetImageList