Hi, All
I am trying to get the Icon from the system. by using SHGetFileInfo I got the HICON,
I tested this HICON with the following code:
SHFILEINFO info; //For getting information about the file
if (::SHGetFileInfo(ucPath.GrabTString(), 0,&info, sizeof(info), SHGFI_ICON | SHGFI_SMALLICON | SHGFI_SHELLICONSIZE) != NULL)
{
//Control view of the
if (iconView != NULL){
HDC hDC = GetDC(NULL); //Get the screen DC
DrawIconEx(hDC, 300, 200, info.hIcon, 0, 0, 0, NULL, DI_NORMAL); //Draw icon on 300, 200 location
ReleaseDC(NULL, hDC);
//following line is not working
iconView->SetRsrcID((unsigned long) info.hIcon);
}
::DestroyIcon(info.hIcon);
}
on the screen at location (300, 200) it shows me icon, I want to set this icon to the tree view, for that I require the resource id, Please suggest if any one knows, How to convert this Handle to unsigned long.
Thanks, Praveen Mamdge