Hi Chris,
There are quite a few other Methods that appear on the MSDN site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/listview_message_processing.asp
What is required or is there anything that prevents these methods being
implemented (barring time, hardwork and knowledge) ?
Ok - I'll put myself on a limb and say this is "doable":) Some of the
functionality you would need is missing, while others (handling the dragging
of an image) is in place (I think)...
To get the Begin drag event add the code to the Listview.XS below (it was
just a quick hack, but it works):
else if Parse_Event("BeginDrag", PERLWIN32GUI_NEM_CONTROL8)
between the lines:
else if Parse_Event("EndLabelEdit", PERLWIN32GUI_NEM_CONTROL7)
else if Parse_Event("KeyDown", PERLWIN32GUI_NEM_KEYDOWN)
Then add the following to the the ListViiew_onEvent function in the main
switch:
case LVN_BEGINDRAG:
/*
* (@)EVENT:BeginDrag(ITEM)
* some doco here...
* (@)APPLIES_TO:ListView
*/
PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL8,
"BeginDrag",
PERLWIN32GUI_ARGTYPE_LONG, (LONG)
lv_notify->iItem,-1);
break;
We now have a new event handler called "BeginDrag" that can be called by OEM
and NEM event models:
sub lvwChart_BeginDrag {
my $item=shift;
print "perl dragging $item \n";
}
So, now you know what item is being dragged, you'll need to use the methods
in the imagelist control to make a dragable image. Once the user releases
the mouse you'll know where the item was dragged to.
And that should be it:) I think.
Hope this helps somewhat.
Cheers,
jez.