| |

VerySource

 Forgot password?
 Register
Search
View: 636|Reply: 1

Drag Drop register problem

[Copy link]

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 Hong Kong

Post time: 2020-1-10 16:20:01
| Show all posts |Read mode
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?
Reply

Use magic Report

0

Threads

18

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-8-16 23:30:01
| Show all posts
Is it the version of the library?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list