General information
Category:
Coding, syntax & commands
Title:
Displaying XP Folder Icons in anTreeView Control
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);
}
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only