views:

182

answers:

6

I'm trying to roll my own implementation of IShellBrowser because I need to have a more full-featured File Open and Save As dialog than Windows allows that is compatible with XP (and ideally with W2000)*

At this point I need to add the standard toolbar that you see in upper right of the dialog (manifest styles for XP and earlier) - a back button, a parent-folder button, a new folder button, and a "tools" drop down.

But so far I've been unsuccessful in finding these icons / images. I've looked in USER32.dll, comdlg32.dll, comctl32.dll, but haven't found anything that quite matches.

I could simply take screen shots of an application where I can find them - but it would possibly more useful to know where they come from, so I can access the various versions of these buttons (high rez, low rez, shallow color, deep color, etc.).

Any ideas?

[Edit: I need it to be compatible with Vista & Windows 7 also. Its just that starting with Vista, they broke the old common dialog model, and their new model is brain-damaged IMO - I no longer have enough access to the state of the dialog to perform the necessary duties that our dialogs used to do - so we are forced to approach the problem from another angle]

+2  A: 

Try looking in imageres.dll. You should find most of the image resources for Vista there.

Robert Harvey
+1  A: 

hey there.

vista style http://www.freeiconsweb.com/Vista-Style-Software-Icons-Set.html

not windows but really complete http://www.freeiconsweb.com/Webmaster-Pixel-Icon-Set.html

just the download link is at the bottom

http://www.freeiconsweb.com/Vista%5FFolders%5FIcons.html

Kieran
+1  A: 

I found this table containing a list of system files containing embedded icons. Perhaps you might find what you're looking for in one of them:

Filename     Number of Icons
-----------------------------
compstui.dll    99
comres.dll      38
cryptui.dll     20
csc.dll         22
dsuiext.dll     35
explorer.exe    18
iexplore.exe    23
inetcpl.cpl     34
inetcpl.dll     14
mmcndmgr.dll    129
mmsys.cpl       40
moricons.dll    140
netshell.dll    157
ntbackup.exe    26
pfmgr.dll       38
progman.exe     48
setupapi.dll    37
SHDOCVW.DLL     35
shell32.dll     238
stobject.dll    31
wiashext.dll    23
wmploc.dll      60
xpsp2res.dll    19
Amro
+2  A: 

Try shell32.dll, in Windows\System32.

JRL
Blast - I did look at this one. No such luck :(
Mordachai
Huh - actually, it does seem to be there! But the ID of the bitmap changes from version to version of Windows. In XP its 216, in Vista its "IDB_TB_SH_DEF_16". I'm going to play with "SHGetImageList()" and see where that gets me...
Mordachai
Ultimately, this is where the toolbar buttons live. Unfortunately, they do live at different IDs depending on version of Windows. Thanks everyone for your help. :D
Mordachai
+1  A: 

If you just ask the shell for it's image list, it will give it to you.

Shell_GetImageLists()

And then you can use whichever ones you want. Yay.

Edit: Looks like SHGetImageList() might be the more-better way of doing it.

jeffamaphone
Sadly, all I get back are 5 icons: "file", "folder", "shared", "link", "delete". I played around with the options a bit, but so far those are the only images that SHGetImageList() returns (in any requested size).
Mordachai
Wow, that sucks. Well, it was worth a try I guess.
jeffamaphone
+1  A: 

Use your own icons. Resource Ids in Shell32.dll are not documented and can change in a Windows Update.

Sheng Jiang 蒋晟
Thanks. I decided to extract the ones I needed from shell32.dll - so that they're consistent for our application.
Mordachai