This seems like a very useful add on code  -  can this be added in so
that those who do not have a compiler can get this?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jez White
Sent: Saturday, January 08, 2005 3:03 AM
To: Chris Wearn; perl-win32-gui-users
Subject: [SPAM] - Re: [perl-win32-gui-users] Listview Control
functionality - Drag n Drop - Email found in subject


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/shell
> cc/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.








-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE
limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and
FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

This email, and any files or previous email messages included with it, may 
contain confidential and/or privileged material. If you are not the intended 
recipient please contact the sender and delete all copies.


Reply via email to