问题
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