Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying XP Folder Icons in anTreeView Control
Message
De
14/01/2003 09:38:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Displaying XP Folder Icons in anTreeView Control
Divers
Thread ID:
00741403
Message ID:
00741403
Vues:
100
I am looking for the XP folder icons so I can include them in a treeview control. Does anyone know where I might find them?

Perhaps they can be extracted directly from the Shell32.dll into the treeview control. But if this is done I would hope that the icons would get substituted for their equivilents on windows 95, NT,2000 ext....

BTW I found the following code on the web but I don't know how to implement it in VFP or if it can be helpful?
{
HWND hwndTV;

hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE,WC_TREEVIEW,g_wszNull,
WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS |WS_VISIBLE,
10,10,300,300,hWnd,(HMENU)98,g_hInst,0);

hil = ImageList_Create(16,16,ILC_COLOR32,10,10);

HICON hi;

HMODULE hmod = LoadLibraryA("shell32");

hi = LoadIcon(hmod,MAKEINTRESOURCE(4)); // closed folder
ImageList_AddIcon(hil,hi);
hi = LoadIcon(hmod,MAKEINTRESOURCE(5)); // open folder
ImageList_AddIcon(hil,hi);

TreeView_SetImageList(hwndTV,hil,TVSIL_NORMAL);

FreeLibrary(hmod);
}
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform