ResViewer | CodeGuru

ResViewer

Download Source Code ResViewer The ResViewer program allows one to see the resources that embedded Within a DLL or EXE file. The app is an SDI app with Splitter windows Where the left window is a tree control and the right is a View. The program was tested on WIN/NT 4.0. Written with MS/VC++ 5.0 […]

Written By
CodeGuru Staff
CodeGuru Staff
Aug 6, 1998
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Download Source Code

ResViewer The ResViewer program allows one to see the resources that embedded
Within a DLL or EXE file. The app is an SDI app with Splitter windows
Where the left window is a tree control and the right is a View. The program was tested
on WIN/NT 4.0. Written with MS/VC++ 5.0


When a file is opened the tree control is set up with the RT_BITMAP, RT_ICON,RT_CURSOR and
RT_DIALOG groups. The groups can then be expanded to see each resource within that group.
When any of the resources are clicked they are displayed in the view.


Once a resource is selected the file save as option from the menu can be used to save the resource
To disk. Since the RT_ICON resources are used instead of GROUP ICON. Each ICON is saved
As a separate file. To use them as an application icon you must save both the 16X16 and 32×32.
The MSVC resource editor can then be used to combine both into a group icon.


The dialogs are saved as .dlg files. The files contain the resource script code to be used in a .RC
File. I did the best I could to make it compatible with the resource editor in MS VC but there
Are no guarentees here. I tested using a lot of different dialogs and they seemed to work ok.
Dialogs that contain external controls cannot be displayed but they can be saved.


There are a zillion resource viewers available on the net. So. Whats difference?
Well, you have the source and can see how its done.


Since this program uses the PERsrc classes as seen in MSJ from Matt Pietrek, the program
Can easily be entended to support all resource types.


My DlgData class is used to parse the DLGTEMPLATE and DLGTEMPLATEX
Structures and to write the .dlg file.


The program was written and tested with MSVC 5.0.

Reference materials:


Matt Pietreks PERsrc Classes.
http://www.microsoft.com/msj

See the back issues for Jan 1998.
The dlgdump program was used as a basis for the DlgData class.
The PERsrc class was used for creating the tree control.


Jeff Prosise Programming Windows 95 with MFC.

The Wanderer sample program was used as the basis for the Explorer like splitter window and tree control.


MSs ICONPRO program was used to see how bitmaps
And icons resources are processed. This program is available
In source at

http://www.microsoft.com/win32dev.


MSs IMAGEEDIT program was also used to see how
Bitmaps icons and cursors are formatted and displayed.
The program is avalable in source from the SDK Jan 1998
And can be downloaded as part of the TOOLS.


The CodeGuru website contains a section on converting
Bitmaps from DIB to DDB. These were helpful since bitmaps are stored in resources as DDB and
must be converted before they can be displayed.

See https://www.codeguru.com

Last updated: 4 May 1998

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.