//通过F5,刷新桌面
    HWND hWndProgram = ::FindWindow( _T("Progman"), NULL);
    HWND hWndDefView = ::FindWindowEx( hWndProgram, NULL, _T("SHELLDLL_DefView"), NULL);
    HWND hWndListView= ::FindWindowEx( hWndDefView, NULL, _T("SysListView32"), NULL);
    ::PostMessage( hWndListView, WM_KEYDOWN, VK_F5, 0);
    ::PostMessage( hWndListView, WM_KEYUP, VK_F5, 0);

 

相关文章: