你好,
桌面图标是放在 SysListView32这个列表中,您可以通过FindWindowEx
方法来获取到桌面图标例如:
if(((hWnd = ::FindWindowEx(NULL, NULL, "Progman", NULL)) == NULL) ||
((hWnd = ::FindWindowEx(hWnd, NULL, "SHELLDLL_DefView", NULL)) == NULL) ||
((hWnd = ::FindWindowEx(hWnd, NULL, "SysListView32", NULL)) == NULL))
{
MessageBox("Could not get desktop window.");
goto Exit;
}
同时您也可以使用ListView_RedrawItems来重新强制绘制某个范围内的 ListViewItem。或者您也可以尝试使用LVM_REDRAWITEMS消息来重新绘制。
希望我的建议能够帮助您解决您的问题
Rob Pan [MSFT]
MSDN Community Support |
Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
