SHDRAGIMAGE structure (shobjidl_core.h)
Contains the information needed to create a drag image.
Syntax
typedef struct SHDRAGIMAGE {
SIZE sizeDragImage;
POINT ptOffset;
HBITMAP hbmpDragImage;
COLORREF crColorKey;
} SHDRAGIMAGE, *LPSHDRAGIMAGE;
Members
sizeDragImage
Type: SIZE
A SIZE structure with the length and width of the drag image.
ptOffset
Type: POINT
A POINT structure that specifies the location of the cursor within the drag image. The structure should contain the offset from the upper-left corner of the drag image to the location of the cursor.
hbmpDragImage
Type: HBITMAP
The drag image's bitmap handle.
crColorKey
Type: COLORREF
The color used by the control to fill the background of the drag image.
Remarks
In Windows Vista this structure is defined in Shobjidl.idl. Prior to that, it was defined in Shlobj.h.
Use the following procedure to create the drag image.
- Create a bitmap of the size specified by sizeDragImage with a handle to a device context (HDC) that is compatible with the screen.
- Draw the bitmap.
- Select the bitmap out of the HDC it was created with.
- Destroy the HDC.
- Assign the bitmap handle to hbmpDragImage.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional with SP3, Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | shobjidl_core.h (include Shobjidl.h) |