void ImageList(HWND hwndList)
{
HICON hicon;
HIMAGELIST hiMage;
HINSTANCE hinst = (HINSTANCE)GetWindowLong(hwndList,GWL_HINSTANCE); //取得应用程序实例句柄
hiMage = ImageList_Create(GetSystemMetrics(SM_CXICON),
GetSystemMetrics(SM_CYICON), TRUE, 1, 1);
hicon = LoadIcon(hinst, MAKEINTRESOURCE(IDI_ICON1));
ImageList_AddIcon(hiMage, hicon);
DeleteObject(hicon);
ListView_SetImageList(hwndList, hiMage, LVSIL_NORMAL);
}
ListView 用法 加入图片(.ico)
最新推荐文章于 2018-09-30 20:21:00 发布