Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

When droping a file draged from ms-explorer, I receive a notification in my COW2AGView::OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point) member function, that's fine.

Now, how do I get this file's fullpath and filename?

Steph
Posted

1 solution

After researching a little bit msdn i think you should try this way :
1) you use the COleDataObject::GetFileData function
COleDataObject::GetFileData to get the pointer to FORMATETC structure
2)use the IDataObject::GetData with that pointer to get the pointer to STGMEDIUM structure
FORMATETC
IDataObject::GetData
STGMEDIUM
3)and then just get the lpszFileName from the STGMEDIUM structure.It should contain the path and the name of the file.
I hope this will help you :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900