I'm trying to enable simple file dragging into my CDialog based window and encountering a problem.
I followed the instructions in the documentation (how to implement.. for non CView based windows), and here's the chopped code:
// override for COleDropTarget:
class CMyDropTarget : public COleDropTarget
virtual BOOL OnDrop( CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point );
class CMyDlg : public CDialog
// and OnCreate handeling
int CMyDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
droptarget.Register( (CWnd*)this );
BOOL CMyDropTarget::OnDrop(CWnd * pWnd, COleDataObject
*pDataObject, DROPEFFECT dropEffect, CPoint point)
Thats about it as described in the How-To documentation. I even initialized the OLE libraries although i dont need ole capabilities.
The result, I can drag items onto my dialog (shows the arrow with a plus sign), but I drop and my OnDrop never gets called (no Beep or breakpoint)...
Any ideas what could be wrong?