Public Member Functions

DragSourceHelper Class Reference

implementation of IDragSourceHelper interface More...

#include <dragdropimpl.h>

Collaboration diagram for DragSourceHelper:
Collaboration graph

List of all members.

Public Member Functions

 DragSourceHelper ()
virtual ~DragSourceHelper ()
HRESULT InitializeFromBitmap (HBITMAP hBitmap, POINT &pt, RECT &rc, IDataObject *pDataObject, COLORREF crColorKey=GetSysColor(COLOR_WINDOW))
HRESULT InitializeFromWindow (HWND hwnd, POINT &pt, IDataObject *pDataObject)

Detailed Description

implementation of IDragSourceHelper interface

Definition at line 214 of file dragdropimpl.h.

Constructor & Destructor Documentation

DragSourceHelper::DragSourceHelper (  ) [inline]

Definition at line 219 of file dragdropimpl.h.

        if (FAILED(CoCreateInstance(CLSID_DragDropHelper,
            pDragSourceHelper = NULL;
virtual DragSourceHelper::~DragSourceHelper (  ) [inline, virtual]

Definition at line 229 of file dragdropimpl.h.

        if (pDragSourceHelper != NULL)

Member Function Documentation

HRESULT DragSourceHelper::InitializeFromBitmap ( HBITMAP  hBitmap,
POINT &  pt,
RECT &  rc,
IDataObject pDataObject,
COLORREF  crColorKey = GetSysColor(COLOR_WINDOW) 
) [inline]

Definition at line 239 of file dragdropimpl.h.

        if (pDragSourceHelper == NULL)
            return E_FAIL;

            SHDRAGIMAGE di;
            BITMAP      bm;
            GetObject(hBitmap, sizeof(bm), &bm);
   = bm.bmWidth;
   = bm.bmHeight;
            di.hbmpDragImage = hBitmap;
            di.crColorKey = crColorKey;
            di.ptOffset.x = pt.x - rc.left;
            di.ptOffset.y = pt.y -;
        return pDragSourceHelper->InitializeFromBitmap(&di, pDataObject);
HRESULT DragSourceHelper::InitializeFromWindow ( HWND  hwnd,
POINT &  pt,
IDataObject pDataObject 
) [inline]

Definition at line 261 of file dragdropimpl.h.

        if (pDragSourceHelper == NULL)
            return E_FAIL;
        return pDragSourceHelper->InitializeFromWindow(hwnd, &pt, pDataObject);

The documentation for this class was generated from the following file:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage