Re: WM_DROPFILES
OK, I don't know what else to suggest :o)
One thing you might try as well is don't run Visual Studio 2005 as
administrator and perhaps you can debug in normal mode. I only really need
to be admin running VS when I'm doing debugging for ASP.NET. Maybe that
would work for you.
Otherwise, sorry...
Tom
"David Webber" <dave@musical-dot-demon-dot-co.uk> wrote in message
news:uJ56goUKIHA.5360@TK2MSFTNGP03.phx.gbl...
First it is not in a dialogue, but in a class derived from CListBox and
another one derived from CListCtrl. In each case the derived control
class has an "initialise" member, called from OnInitDialog which
previously filled the list, and now also calls DragAcceptFiles(TRUE);
[This looks ok as the mouse cursor changes appropriately when I'm dragging
and it goes over the list.]
Yeah, it must be UAC goofing it up somehow. Does it work OK if you
temporarily turn off UAC?
Then in the message map of the control class (not the dialogue) I have
ON_WM_DROPFILES() and the derived dialogue class has a function which
looks very like yours. My call to the base class
CListBox::OnDropFiles(hDropInfo); was at the end, but I have put it at the
start and it makes no difference - I suspect it does nothing anyway. [It
actually appears to be CWnd::OnDropFiles() in fact.]
Yeah, I think that is in from my by habit.
When I launch explorer with "run as administrator, I have to confirm I
want to do it of course, but thereafter, as I drill down to the folder I'm
looking for, I see no hint that it is any different from a normal
instance. Should I?
It looks the same to me as well.
Anyway it is ok running with normal privileges, but I had hoped to find an
easy way of debugging drag and drop, and am puzzled why this isn't working
for me.
See above.
[BTW also adding WM_ON_DROPFILES() and a handler to the CDialog- derived
class, means that it too gets called, but after the Control's version. I
found that out when I was experimenting with the app running with normal
privileges.]
Yeah, it sounds like in your case you just want it in the control,
especially if you plan to reuse the control elsewhere and/or you only want
the drop to work when the user is over the control rather than over anywhere
on the dialog.
Tom