Resolves a wm_dropfiles message that cannot be responded to when UAC is turned on Win7

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.