How to send a refresh message to all Resource Manager windows

Source: Internet
Author: User

The original problem is that I want to program the display and hiding of file extensions. In fact, I want to modify the hidefileext value of hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced, but the problem is that after the key value is modified, the system does not know the update. I think it should be to broadcast a message (or some messages) to the system ). I tried to send various messages to Windows, including broadcastsystemmessage, shchangenoworkflow, systemparametersinfo, and other functions, but none of them succeeded.

Another compromise is that, after I changed the registry key value above, I pressed F5 in the resource manager window to refresh the key and it did not work, only by right-clicking and refreshing can the extension be hidden or displayed. However, if you have right-clicked and refreshed in a resource manager window, you can use the F5 key to hide or display the extension in other Resource Manager windows.
Step back, how should I send the F5 button message to all open Resource Manager windows? My idea is to use postmessage (handle, wm_keydown, vk_f5, 0); postmessage (handle, wm_keyup, vk_f5, 0); but it is quite difficult to determine handle, I tried to use the top-level handle of the window and the folderview handle in it. Moreover, I think that even finding a method to send messages through vk_f5 will cause huge system overhead. Besides, since all the Resource Manager windows are traversed (does this mean that all the Resource Manager windows will get a focus ?), If the traversal order is not properly controlled, it will cause changes in the coverage order of each window, which will certainly make users feel uncomfortable.
There are probably so many questions. Do you have any good solutions? Thank you for your patience.

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.