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

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 32x32. 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 http://www.codeguru.com

Last updated: 4 May 1998



Comments

  • Nice Job - Includes Saving

    Posted by Legacy on 03/01/2003 12:00am

    Originally posted by: Chris Morse


    I was working on this same project last night,
    but as a Command prompt utility to extract the
    resources of ALL files across your file system,
    saving each type of resource in it's own directory.

    RT_BITMAP resources, as you know, don't contain the
    BITMAPFILEINFO header inside the resource, so you must
    create them yourself before you write them to disk.
    Same for ICON files. If you just write out the resource
    data itself, you won't get a usable file.

    This article shows how to both view and save the BITMAP
    and ICON resources. A nice job, and a great help, as
    I wasn't sure how to generate ICON headers.. This will
    save me a bunch of time, so THANKS!

    // CHRIS

    Reply
  • And with 16 bit resources ?

    Posted by Legacy on 08/23/2000 12:00am

    Originally posted by: Olivier

    It doesn't work when I try to open 16 bit resources. Why?
    Try to open MORICONS.DLL with DevStudio and with the code sample.

    Reply
  • How To write resource back under win95/98 (No Comments)

    Posted by Legacy on 07/28/2000 12:00am

    Originally posted by: Wangxh

    How To write resource back under win95/98 (No Comments)

    Reply
  • How U Got From Exe

    Posted by Legacy on 04/23/2000 12:00am

    Originally posted by: ASHPAQ ATTAR

    It 'r really nice work i was trying for it from many months
    thanks for it

    Reply
  • Resource Comparison

    Posted by Legacy on 02/22/2000 12:00am

    Originally posted by: Dan Satria

    Very nice UI and very nice of you to share the source code.

    I would like to take it to the next step though. Do any of you know a program to compare resources of two, maybe three DLLs.

    I am trying to solve a situation where an English DLL is translated to a foreign language, and the English DLL has been updated for bug fixes. It would be nice to be able to compare the two English DLLs (old and new) and find differences in the resources. If there is no difference, then the translated DLL doesn't have to be retranslated again.

    Reply
  • all

    Posted by Legacy on 05/18/1999 12:00am

    Originally posted by: Gonenc

    thank you for all God bless you

    Reply
  • Exactly what I was looking for, thanks.

    Posted by Legacy on 03/16/1999 12:00am

    Originally posted by: Larry Deack

    I was looking for source code to parse the resources and found Matt Pietrek's stuff but it's nice to have another source for this that extends his examples. Thanks for posting this, it will really help to see how somebody else did this.

    Reply
  • why not use TVN_SELCHANGED msg?

    Posted by Legacy on 02/09/1999 12:00am

    Originally posted by: ZXL

    your tools make my finger tired on mouse :)

    Reply
  • Why not just use DevStudio ?

    Posted by Legacy on 12/22/1998 12:00am

    Originally posted by: Colin Johnson

    Why not just use DevStudio and open the files "As Resources" ?
    

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds