implementation of IDragSourceHelper interface More...
#include <dragdropimpl.h>

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) |
implementation of IDragSourceHelper interface
Definition at line 214 of file dragdropimpl.h.
| DragSourceHelper::DragSourceHelper | ( | ) | [inline] |
Definition at line 219 of file dragdropimpl.h.
{
if (FAILED(CoCreateInstance(CLSID_DragDropHelper,
NULL,
CLSCTX_INPROC_SERVER,
IID_IDragSourceHelper,
(void**)&pDragSourceHelper)))
pDragSourceHelper = NULL;
}
| virtual DragSourceHelper::~DragSourceHelper | ( | ) | [inline, virtual] |
Definition at line 229 of file dragdropimpl.h.
{
if (pDragSourceHelper != NULL)
{
pDragSourceHelper->Release();
pDragSourceHelper=NULL;
}
}
| 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);
di.sizeDragImage.cx = bm.bmWidth;
di.sizeDragImage.cy = bm.bmHeight;
di.hbmpDragImage = hBitmap;
di.crColorKey = crColorKey;
di.ptOffset.x = pt.x - rc.left;
di.ptOffset.y = pt.y - rc.top;
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);
}
|
ROS Explorer Source Code Documentation
generated on 02.01.2013 by
|