Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C++
pITEMDLIST_File = ILCreateFromPath(fName);
					if (!pITEMDLIST_File)
						return 0;

					iResu = SHBindToParent(pITEMDLIST_File, &IID_IShellFolder, (void**)&pFolder, (PCUITEMID_CHILD*)&pFile_list_relative);
					if (iResu != S_OK)
						return 0;

					pArray[0] = pFile_list_relative;
					iResu = IShellFolder_GetUIObjectOf(pFolder, NULL, 1, pArray, riid, NULL, (void**)&pInterfaceResu);
					if (iResu != S_OK)
						return 0;

					IShellFolder_Release(pFolder);

					//return pInterfaceResu;
					pObj = (IDataObject*)pInterfaceResu;
				}

				if (!pObj)
					break;

				pSrc = _CreateDropSource();
				if (!pSrc)
				{
					//IDataObject_Release(pObj);
					break;
				}

				DoDragDrop(pObj, NULL, DROPEFFECT_COPY DROPEFFECT_LINK, &dwEffect);


What I have tried:

Using above code Right now i am able to do drag and drop and but while dragging only plus symbol is coming out of the window but i want mouse data .For example if i iam dragging folder ,folder image suppose to come.can any one help with that
Posted
Updated 22-Apr-19 23:15pm
v5

1 solution

You are on the brink of the Drag and Drop operation. Read the DoDragDrop documentation.

You must extract the data object (pObj) the data to work with. Maybe the data isnt properly set in the source.

tip: use some external program (like MS Paint) for simulating bitmap data
 
Share this answer
 
Comments
Member 14075717 30-Apr-19 2:07am    
Hi karstenk as you said from local machine(explorer) to remote machine(host or my application) i did means i implemented idrop target but i have to do drag and drop a virtual file from host(my application ) to local machine(explorer).I think we have to implement the i data object. i want to know the way to implement idataobject can you give me mechanism or any idea? tahnk you

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