How do i create a drag and drop start event in REPORT listview in winapi

爷,独闯天下 提交于 2019-12-12 01:44:56

问题


I've stumbled into a problem with drag and drop.
I've got a REPORT style of my list view. First thing to think of is catching the LVN_BEGINDRAG message, but I was unable to catch it in the parent window procedure. I went to MSDN and figured out that REPORT style doesn't support this notification because other styles had some mentioning of d'n'd in their description and report style didn't have one.
So I went the other path - handling NM_CLICK notification, but actually it's not perfect for the situation. The problem is that if i want to drag the already selected item, and click on it and hold the button, then no notification comes until I stop pressing the button.

I've also tried subclassing listview to catch LVM_LBUTTONDOWN to get 100% drag enter before any other calculations happen inside of a window proc, but it doesnt' do the job also; or maybe I've done some bad work subclassing the list view. Anyways. I need advice how to do it properly.
My target drag and drop zone is a treeview control actually. Thanks

来源:https://stackoverflow.com/questions/25365106/how-do-i-create-a-drag-and-drop-start-event-in-report-listview-in-winapi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!