Jump to content
  • Advertisement
Sign in to follow this  
Xeile

Handling Handles!

This topic is 5390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Now I get it. Thank you both. I didn't know that I had to convert it with the (HDROP)wParam statement, Extrarius provided.

I think I have a lift-off now. Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!