J'essaie d'obtenir l'icône du système. en utilisant SHGetFileInfo Je suis le HICON,Convertir HICON pour le long non signé
Je l'ai testé ce HICON avec le code suivant:
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);
}
sur l'écran à l'emplacement (300, 200), il me montre icône, Je veux mettre cette icône à l'arborescence, pour cela, j'ai besoin de l'ID de ressource, S'il vous plaît suggérer si quelqu'un sait, Comment convertir cette poignée en unsigned long.
Merci, Praveen Mamdge
quel est le type de IconView? –