Refresh all opened Windows Explorer windows

Refresh (F5) all opened Windows Explorer windows with the following code. Useful if you have just hide extensions programmatically.

HWND hwnd = FindWindowEx(NULL, NULL, "CabinetWClass", NULL);
while(hwnd != NULL)
{
	PostMessage(hwnd, WM_COMMAND, 41504, 0);
	hwnd = FindWindowEx(NULL, hwnd, "CabinetWClass", NULL);
}
Categories: C Tags: , , ,
%d bloggers like this: