So, you managed to battle your way through the first part of
this series. It seemed that disabling Windows
File Protection was the most difficult. With
the defeat of WFP, we can now easily move on to more advanced resource
hacking. This article will assume you
made it through Part 1. If not, I
strongly recommend you read through it by going here.
First, I am going to show you some features you may not have
discovered before. Also, I will describe
some of the code for the dialogs to help you edit more quickly; and finally,
how to add resources to files. Enough
talk—let’s get started on Resource Hacking Part 2.
Edit Controls and Dialogs
Begin by opening Resource Hacker and shell32.dll. To be consistent, we will continue using the
same ‘open with’ dialog from the first article.
For reference, it is dialog number 1063.
Once you have that open, begin by selecting the ‘OK’ button in the dialog preview, then right click on it and go
to Edit Control. This is the
control/dialog editor which will allow you to easily edit the options of
controls on a dialog without having to know all the fancy code in the
As you can see at the top, the caption of the button is ‘OK’, and you can easily change it by typing
whatever you want in that box. You can
also easily assign its position, width, and height. The Class Name describes what kind of control
it is, and the Tab Order is sort of like a ‘z-axis.’ It will allow you to arrange the controls
over the top of one another. This is
very useful to remember as some dialogs purposefully place dynamic text areas
over each other. At the very bottom,
there are a bunch of options for the control.
I’m not going to go over all of them, as you can easily try them out for
yourself and see the effects live on your own screen.
Now let’s take a look at the Edit Dialog box. Right click in an empty place and select
‘Edit Dialog.’ Looks familiar doesn’t
it? A lot of the same stuff from the
Edit Control dialog applies here. Once
again, the caption changes the title of the dialog, and you have your location
and size settings. A new one here is the
ability to change the font of the text used on the dialog. All you need to do is find the name of a font
you like and type it in. You also have
options to change the look of the dialog in the bottom section. Feel free to experiment until you find a look
you like. Hopefully, as you have been
playing with the settings in the Edit Control and Dialog boxes, you have seen
the changes happening to the code in the background as well because that’s
where we are headed next.