HICON hLargeIcon = NULL;
HICON hSmallIcon =NULL;
ExtractIconEx(strPath,0,&hLargeIcon,&hSmallIcon,1);//获取Ap的系统图标
ICONINFO info;
::GetIconInfo (hSmallIcon, &info);
BITMAP bmp;
::GetObject(info.hbmColor, sizeof(BITMAP), (LPVOID)&bmp);
HBITMAP hBmp = (HBITMAP) ::CopyImage (info.hbmColor, IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT);
openWithListView.AppendMenu(MF_STRING,ID_FILE_OPENWITH_BEGIN+j,strApDisplayName);
SetMenuItemBitmaps(openWithListView, j-1, MF_BYPOSITION, hBmp, hBmp);//MenuItem 显示图标
现在菜单项前图标能显示,但有小黑影~~~ 如何解决
HICON hSmallIcon =NULL;
ExtractIconEx(strPath,0,&hLargeIcon,&hSmallIcon,1);//获取Ap的系统图标
ICONINFO info;
::GetIconInfo (hSmallIcon, &info);
BITMAP bmp;
::GetObject(info.hbmColor, sizeof(BITMAP), (LPVOID)&bmp);
HBITMAP hBmp = (HBITMAP) ::CopyImage (info.hbmColor, IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT);
openWithListView.AppendMenu(MF_STRING,ID_FILE_OPENWITH_BEGIN+j,strApDisplayName);
SetMenuItemBitmaps(openWithListView, j-1, MF_BYPOSITION, hBmp, hBmp);//MenuItem 显示图标
现在菜单项前图标能显示,但有小黑影~~~ 如何解决
ConvertIconToBmp(pDC, strOpenApPath);