I've read this answer about how one cannot use drag & drop files from explorer (typically running without extra admin privileges) with UAC-elevated applications.
One would think that elevating privileges to an EXE would give, well, more privileges, yet MS managed to give less privileges and break drag & drop functionality at the same time!
Anyway, while appreciated, the answer given by Mr. Arnaud Bouchez (disabling UIPI - User Interface Privilege Isolation) seems a bit hackish, my question is: is there a recommended way to programmatically enable drag & drop without messing with user's registry
I'm thinking about requesting "drag & drop ability" in manifest or something like that.
NOTE: I mainly have this problem with Windows 7, but I assume the question is pertinent all Windows versions starting from Vista
You can change the UIPI filter on the window of the privileged application by using ChangeWindowMessageFilterEx
to let file drag&drop related messages be received. WM_DROPFILES
is the most obvious one, WM_COPYDATA
is another one. There's also an undocumented message involved: $0049
, you'll find sometimes it is referred to as WM_COPYGLOBALDATA
. In fact a search on the last one, I believe, will reveal some code examples related with your question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With