CodePudding user response:
SHChangeNotifyhttp://blog.csdn.net/wowolook/article/details/8263001
CodePudding user response:
Thanks, try tomorrow! In addition to see have personal say use SHChangeNotify (SHCNE_ASSOCCHANGED SHCNF_IDLIST, NULL, NULL); To refresh icon, but always work under Windows XP, Windows 7, normallyCodePudding user response:
: : SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST | SHCNF_FLUSH, NULL, NULL);
CodePudding user response:
Studied theCodePudding user response:
The simulation button "F5" success:HWND HWND=: : GetDesktopWindow ();
HWnd=: : FindWindowEx (hWnd, 0, "Progman", 0).
HWnd=: : FindWindowEx (hWnd, 0, "SHELLDLL_DefView", 0).
HWnd=: : FindWindowEx (hWnd, 0, "SysListView32", 0).//when the hWnd is that you need
//InvalidateRect (hWnd, TRUE);
//hWnd - & gt; Invalidate (false);
//: : InvalidateRect (hWnd, 0, TRUE);
//: : InvalidateRect (NULL, NULL, TRUE);
: : PostMessage (hWnd, WM_KEYDOWN, VK_F5, 0);
: : PostMessage (hWnd, WM_KEYUP, VK_F5, 0);