1 // Run as Administrator, the program window will be able to receive the drag-and-drop file message "Wm_dropfiles". 2 Changewndmessagefilterok (Wm_dropfiles, msgflt_add); 3 Changewndmessagefilterok (0x0049, msgflt_add); // 0x0049 = = Wm_copyglobaldata
1 bool Cxxxframewnd::changewndmessagefilterok (UINT nmessage, bool ballow)2 {3typedef BOOL (WINAPI *CHANGEWINDOWMESSAGEFILTEROKFN) (UINT, DWORD);4 5Hmodule HModUser32 =NULL;6HModUser32 = LoadLibrary (_t ("user32.dll"));7 if(HModUser32 = =NULL) {8 returnFALSE;9 }Ten OneCHANGEWINDOWMESSAGEFILTEROKFN Pfnchangewindowmessagefilter = (CHANGEWINDOWMESSAGEFILTEROKFN) GetProcAddress ( HModUser32,"Changewindowmessagefilter"); A if(Pfnchangewindowmessagefilter = =NULL) - { - FreeLibrary (HMODUSER32); the returnFALSE; - } - - FreeLibrary (HMODUSER32); + - returnPfnchangewindowmessagefilter (nmessage, ballow?)msgflt_add:msgflt_remove); +}
Reprint: http://bbs.csdn.net/topics/390291295
Reprint: http://blog.csdn.net/lgxing/article/details/13171167
Reprint: http://blog.csdn.net/whatday/article/details/44278605
Reprint: http://www.cnblogs.com/findumars/p/5931332.html
Reprint: http://blog.csdn.net/ningbinzhang/article/details/39956801
Resolves a wm_dropfiles message that cannot be responded to when UAC is turned on Win7