COleDataSource oleDS;
dwBytes = sizeof((HBITMAP)m_pPredrawBitmap);
hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, dwBytes);
BYTE *pDropData = (BYTE *) ::GlobalLock(hData);
::CopyMemory(pDropData, (HBITMAP)m_pPredrawBitmap, dwBytes);
::GlobalUnlock(hData);
oleDS.CacheGlobalData(CF_BITMAP, hData);
dropResult = oleDS.DoDragDrop(DROPEFFECT_COPY);
Does anyone have info on how to do this? Please, no generic drag and drop
sample code. I have other drag and drop working and most samples presents
one way or another that doesn't seem to address this specific problem.
The OLE subsystem takes care of this for you. If it needs to make a copy it
will.
"loc" <loc.n...@kla-tencor.com> wrote in message
news:uNKJTTRpBHA.1716@tkmsftngp02...
"Robert Quirk" <robert...@emrad.com> wrote in message
news:1011959627.19672....@news.demon.co.uk...
(HBITMAP)m_pDrawBitmap->GetSafeHandle() that is
would you consider casting a CBitmap * to a HBITMAP ? My initial thought is
no .. why should the pointer be equivalent to the wrapped HBITMAP ?
"news.microsoft.com" <loc.n...@kla-tencor.com> wrote in message
news:#2ULOidpBHA.1004@tkmsftngp07...