Handling Handles!
MS Visual C++ 6.0
With my program I'm trying to get a filehandle. Oke, I drop a file from Windows Explorer on my program window. I receive the message ID 563 which is thrown on the WM_DROPFILES event. The parameters: wParam = 'some value' lParam = 0 (as it should be).
Now my question is, what to do with the value wParam give me? How do I use it?
Well, I believe the return is a drop handle (HDROP) if I remember right. The drop handle should be able to return file strings by index using DragQueryFile (giving a 0xFFFFFFFF index will give you the count of the dragged files). Querying by index will give you the file name, then you go from there.
-fel
-fel
I still don't quite get it. Here is a sample:
case WM_DROPFILES:
//DragFiles( hWnd, wParam ); // A user-def function
HDROP hDrop;
hDrop = wParam;
return 0;
Ok assigning wParam does not work, cause hDrop is a HDROP structure and wParam an unsigned integer.
How can use the value of wParam again?
case WM_DROPFILES:
//DragFiles( hWnd, wParam ); // A user-def function
HDROP hDrop;
hDrop = wParam;
return 0;
Ok assigning wParam does not work, cause hDrop is a HDROP structure and wParam an unsigned integer.
How can use the value of wParam again?
Handles are just integers that go someplace.
You need to cast the wParam to an HDROP.
-fel
You need to cast the wParam to an HDROP.
-fel
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement