From: <Fo...@ao...> - 2001-05-07 14:28:40
|
In all likelihood, your best bet is to subclass the window you want it to ac= cept the files, then filter for the appropriate message. I can dig up some M= SKB articles on it if you'd like. Dave In a message dated Sun, 6 May 2001 11:47:29 PM Eastern Daylight Time, Johan=20= Lindstrom <jp...@bo...> writes: << I wrote: >Anyone have any idea of things I have to think about if I want to try to=20 >implement a drag-n-drop feature? I have already found the correct set of=20 >functions and messages in the Win32 Reference. Ok, so I managed to tell a window to accept files dragged from the Explorer=20 with the DragAcceptFiles() function (from the shell32.dll). When I drag the mouse over the window, the mouse pointer changes. When I=20 drop, the window is sent a WM_DROPFILES event. My problem now is how I should capture this event. Naive first try: timer which triggers really often. In the event handler I=20 call $myWindow->PeekMessage(WM_DROPFILES, WM_DROPFILES) and if it returns true, I call $myWindow->GetMessage(WM_DROPFILES, WM_DROPFILES) That works like one in ten times or something. Clearly not the way to go. So, any better way of detecting the WM_DROPFILES event? /J -- Johan Lindstr=F6m, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> |