|
I'm doing a drag drop, but in COleDropTarget :: Register, if (CoLockObjectExternal (lpUnknown, TRUE, FALSE)! = S_OK) the sentence can never pass.
I talk about my approach:
Pick a dlg project
Added CListCtrlEx: public CListCtrl and did RTTI work
Join COleDropTargetEx: public COleDropTarget
Add COleDropTargetEx ot object in CListCtrlEx
Add ot.Register (this) to the CListCtrlEx init function;
Call the CListCtrlEx init function in the dlg's OnInitDlg method
Now the problem is: CoLockObjectExternal (lpUnknown, TRUE, FALSE) is wrong, which causes register to be unable to continue. Even if you force the set statement to the next step, register will report an error. What is wrong with me?
Is it necessary to use a view to code for Drag Drop? |
|