Sagar
Sagar

Reputation: 167

Drag and Drop in Windows 7 not working in admin mode

Problem

I have a strange problem. I have written an application in MFC(using VS2003) to handle "Drag and Drop" of file/folder. When I run the application in administrator mode, DnD is simply rejected but works in other way (when I don't choose to run in admin mode).

Work around

I have tried several ways :

http://helgeklein.com/blog/2010/03/how-to-enable-drag-and-drop-for-an-elevated-mfc-application-on-vistawindows-7/

http://www.cdartdisplay.com/forum/showpost.php?p=12302&postcount=13

http://forums.codeguru.com/showthread.php?499909-MFC-Drag-and-Drop-works-on-XP-broken-on-Vista-Windows-7-(

None of them worked for me.

Development tool details

IDE : Visual Studio 2003 version 7.1.3088 OS : Windows 7 Professional (64 bit)

Please suggest me a solution to resolve it.

Thanks.

Upvotes: 0

Views: 1286

Answers (1)

Ajay
Ajay

Reputation: 18431

Windows Explorer and Windows does many tricks around. Enable all messages:

ChangeWindowMessageFilter (WM_DROPFILES, MSGFLT_ADD);
ChangeWindowMessageFilter (WM_COPYDATA, MSGFLT_ADD);
ChangeWindowMessageFilter (0x0049, MSGFLT_ADD);

Got it from: http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/thread/2fa935cf-be57-4bcc-9b96-7ee5a6b2b7a5/

Upvotes: 2

Related Questions