Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying XP Folder Icons in anTreeView Control
Message
 
 
To
14/01/2003 09:38:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00741403
Message ID:
00741465
Views:
23
Take a look at IconBuddy for Visual FoxPro 6 and 7 Version 1.3 File #15832.

>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);
>}
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform