|
|
|
date: Sun, 17 Aug 2008 07:00:00 -0700,
group: microsoft.public.platformsdk.shell
back
DragQueryFile doesn't work for me
I'm trying to create a custom form, using Borland C++BuilderX, that will read
the name of a file that has been dropped into it. I've seen many examples
like this:
// Upon window creation
DragAcceptFiles(hMywindow);
// Message Handler
LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_DROPFILES:
HDROP hDrop;
_uiNUMFILES = DragQueryFile(hDrop,0xFFFFFFFF,NULL,0);
DragFinish(hDrop);
return 0;
}
return DefWindowProc(hWindow,msg,wParam,lParam);
}
I have verified that I am receiving the WM_DROPFILES message, and that the
value of NUMFILES has been changed upon file-drop, but the return value is
always -1, regardless of how many files are dropped. What am I doing wrong?
date: Sun, 17 Aug 2008 07:00:00 -0700
author: Sumdood
|
|