Windows Dev Center

IDragSourceHelper::InitializeFromBitmap method

Initializes the drag-image manager for a windowless control.

Syntax


HRESULT InitializeFromBitmap(
  [in] LPSHDRAGIMAGE pshdi,
  [in] IDataObject   *pDataObject
);

Parameters

pshdi [in]

Type: LPSHDRAGIMAGE

The SHDRAGIMAGE structure that contains information about the bitmap.

pDataObject [in]

Type: IDataObject*

A pointer to the data object's IDataObject interface.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Because InitializeFromBitmap always performs the RGB multiplication step in calculating the alpha value, you should always pass a bitmap without premultiplied alpha blending. Note that no error will result from passing the method a bitmap with premultiplied alpha blending, but this method will multiply it again, doubling the resulting alpha value.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 5.0 or later)

See also

IDragSourceHelper

 

 

Community Additions

ADD
Show:
© 2015 Microsoft