# 解决Win7及以后以管理员权限运行的程序无法收到 WM_DROPFILES 消息的问题

Windows的命令提示符本来就极其难用了，还tm有这种feature，真无语。

Drag and Drop File into Application under run as administrator

Your drag'n'drop isn't working for permissions levels differences, if the other program/explorer you're dragging from is not elevated as administrator Windows is smart enough to not let the user do that.

Can't drag and drop when 'run as administrator'

The problem is tied to how security permissions work. The ability to drag and drop from a normal applications to an elevated one would break the security model behind UAC. However, I'm unclear as to why a UAC prompt isn't shown, thus allowing for a temporary elevated operation (much like any linux user experiences every day). This is definitely something that Microsoft needs to work on. What troubles me is that this problem is already old. Vista behaved the same.

There's 2 things you can do (one ugly, one annoying)

Ugly: Disable UAC. But you lose all the extra security it offers.
Annoying: Use another File manager and run it too as an Administrator

Why another file manager? Because you can't actually elevate Windows Explorer. Despite seeing the option in the context menu of the Windows Explorer icon and a UAC prompt being displayed, the fact is Windows Explorer will not be elevated.


ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);


【传说】女孩不哭(191035066) 0:47:40 AM

【吐槽】HwangBae(378094471) 0:47:43 AM
win7开始最好用带ex的版本，并且这种方法对于OLE drag drop不管用。这是系统的UIPI机制。
【传说】女孩不哭(191035066) 0:48:53 AM

【活跃】『月夜』<3.vc@163.com> 0:49:02 AM
[表情]