Problems related to hiding and displaying files and folder registries

Source: Internet
Author: User


The Registry is modified as follows: [HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Adv anced] www.2cto.com "Hidden" = dword: 00000002 // Hide File "Hidden" = dword: 00000001 // show all files "Hidden" = dword: 00000000 // do not display system files or hide files "ShowCompColor" = dword: 00000000 "HideFileExt" = dword: 00000001 // hide the extensions of known types "ShowInfoTip" = dword: 00000001 // The prompt message "ClassicViewState" = dword: 00000000 is displayed when you point to the folder and desktop After the View sets vc to update the registry, automatically refresh the desktop in two steps. The first step is to allow explorer to re-read information from the registry, and the second step is to refresh the desktop. The Code is as follows: void crefreshjavaserdlg (){:: SHChangeNotify (shcn_assocchanged, SHCNF_IDLIST | SHCNF_FLUSH, 0, 0); HWND hWndProgram =: FindWindow (_ T ("Progman"), NULL); HWND hWndDefView = :: find1_wex (hWndProgram, NULL, _ T ("SHELLDLL_DefView"), NULL); HWND hWndListView =: find1_wex (hWndDefView, NULL, _ T ("SysListView32"), NU LL); reply: PostMessage (hWndListView, WM_KEYDOWN, VK_F5, 0);: PostMessage (hWndListView, WM_KEYUP, VK_F5, 0);} Try SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, NULL, NULL); if you use SystemParametersInfo to modify system settings, the last parameter should be set to SPIF_SENDWININICHANGE. However, not all operations can take effect immediately. There is so much information in the registry. The key is what you modified and whether your program is interested. For system settings, try: www.2cto.com DWORD result; SendMessageTimeout (HWND_BROADCAST, WM_SETTINGCHANGE, NULL, NULL, struct | SMTO_BLOCK, 3000, // timeout in milliseconds & result); Author: IMGTN

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.