I built a winforms application, and implemented drag&drop functionality. this functionality works great in WinXP or in Win7 from Run-As-Administrator applications.
The problems become when tring to drag from non-admin application in Win7 to my program, it just not working.
I understand this because the OS filtering the messages. I found a solution for that here: http://blog.helgeklein.com/2010/03/how-to-enable-drag-and-drop-for.html but it does not seems to work.
here is the workaround code:
[DllImport("user32.dll", SetLastError = true)]
static extern bool ChangeWindowMessageFilter(uint message, uint dwFlag);
private const uint WM_DROPFILES = 0x233;
private const uint WM_COPYDATA = 0x004A;
private const uint WM_COPYGLOBALDATA = 0x0049;
private const uint MSGFLT_ADD = 1;
ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);
ChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD);
ChangeWindowMessageFilter(WM_COPYGLOBALDATA, MSGFLT_ADD);
How to make it work?