【Windows Message】MFC 通过F5,刷新桌面

    //通过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);
原文地址:https://www.cnblogs.com/happykoukou/p/7449358.html