DoDragDrop() from another thread

前端 未结 3 1918
情深已故
情深已故 2021-01-27 09:02

Every time i want let the user to drag an control, i calling DoDragDrop of that control.

The drag & drop works fine, but i have problem with things around:

3条回答
  •  花落未央
    2021-01-27 09:16

    You need to forget about using a thread, that's only going to deliver D+D notifications to the windows that were created on that thread. Which will not be your controls.

    I can't do much with a "code is sucks" diagnostic. The DoDragDrop() call itself will indeed block until the mouse button is released. Another message loop, internal to COM code will take over and deliver the Windows messages. Timer and paint messages should be delivered as normal. A diagnostic is very hard to come by until you post some repro code.

提交回复
热议问题