This sounds funny..just a little experiment.
i wanted to simulate a drag drop of a file on a Application/Window using Send Message.
Is it possible?
I dont have code for the application but on the executable.
The application is IP Messenger.
What i wanted to do is use “Send To” functionality to send the file to an .exe ,which will
find IPMessenger window and simulate a drag drop thr code.
The user will select the file and right click “send to” to the .exe which will do drag drop from code.
**Note: IP Messenger supports drag-drop operation for files
thx
amit
There is the
WM_DROPFILESMessage. I guess that you could useCreateToolhelp32Snapshotto locate the window that is IP Messenger and then build theDROPFILESstructure to send with theWM_DROPFILESmessage.The final link would be to Codeproject, with some help on creating the
DROPFILESstructure: How to Implement Drag and Drop Between Your Program and Explorer.Instead of using
CreatToolhelp32Snapshotyou could be usingFindWindowfunction. Here you will get theHWNDfor IP Messenger directly, instead ofCTh32S, which will only locate theHANDLEfor the process.When this is done you create the
DROPFILESstructure. Read the comments on the CodeProject link in the “Initiating a drag and drop” section for more info of how.And finally you send it with sendmessage