Resource creator/editor/previewer [ Code Name - "RP" ]

Started by ramguru, November 29, 2006, 09:51:28 PM

Previous topic - Next topic

ramguru


I've created this thread to keep me busy rather than to deliver quality product.
You're maybe wondering what's all about... The answer is straightforward - M$ resource file format in depth.
Yes I have an ambition...
...named

Resource Puncher

It's soul purpose is to replace tools like: Restorator 2006, Resource Hacker, Resource Builder... Do you know what are in common among these tools ? - They are made using one or another version of Delphi. That's right, this is the reason I sleep with one eye open, what if we're really slaves of matrix, and the fact cannot be changed. However, it's about time to be proved on the contrary.

Program description:
It uses "fast" recursive algo which enumerates all the resources: type\ID\language
---- one ID may have 1 to Many Languages (GenuineCheck.exe f.e.)
It reads resources directly from pointer returned by MapViewOfFile (meaning no supporting functions to read resource were used)
It uses Scintilla edit control to provide script editing/viewing capability
It uses ShineInHex hexedit/view control so that you can look inside particular resource & make any investigation necessary

What it does now:
Generates resource scripts (in UTF-8) for: MENU, MENUEX, DIALOG, DIALOGEX, STRINGTABLE, ACCELERATORS
Shows preview of dialogs (DIALOG, DIALOGEX) that doesn't use custom class
Can save any resource as binary file
Can open any resource in hex window
--Note tree-view window has popup-menu (feel free to right-click on resource id/language)

What will it do:
+will add resource (resource section if necessary) directly to executable-fle (dll,exe)
+will have internal image-editor
+preview window will turn into resource editor
+HELP ME DECIDE

Known facts:
Option dialog does nothing
Most of menu items do nothing
Most of toolbar buttons do nothing
Executable-file cannot contain more than 5000 individual resources

What I'm working now on:
still working on visual dialog editor & its synchronization with script-editing window

Basically I will be posting new build every week editing existing post, since I have a goal and there is no time constraints I'm sure you will be seeing alfa version of "RP" in at least 2007

What's new:
in pA 0.3.0 since preAlpha 0.2.0:
Dialog editor is almost finished (menu: Resource->New->DIALOGEX)
Dialog editor is half synchronized with scintilla window
in pA 0.4.0 since preAlpha 0.3.0:
Many improvements in dialog editor
New icons (in dialog editor, main window LILA icons)
Improved synchronization with script window
Added update manager (thanks to Ehtyar)



[attachment deleted by admin]

six_L

hey,ramguru
good work!  :U
it is better than EXESCOPE.
regards

ramguru

Thanx 4 comment, six_L ! I don't think that my tool is better than ExeScope at the moment, but I hope it will be in the future. BTW ExeScope has one advantage - it shows some PE information, not only what's inside [.rsrc] section.

PBrennick

hmmm. The dialog boxes sorta disappear when I click in them. If I doubleclick, the text shows for a split second.

I assume it is very early beta, so far. I like the way you seem to be heading.  :U

I will watch this thread for sure.
Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Thanks for response, Paul. I'm glad you're interested in my work. However, I have hard time recreating the situation when dialog boxes disappear  :red Could you please be more specific (it occurs in dialog editor or elsewhere, when using menu-command Resource->New->DIALOGEX or when previewing loaded resource) so I could know is this a bug or not implemented thing. Thanks...

PBrennick

Okay,
I have figured out what is happening. I, for example, am drawing a border around some buttons. Now, your program is treating this as an opaque box, I think and when I click on it the buttons move behind it and this is creating the phenomenom I was describing  because they become hidden. I cannot bring them back to the foreground. The only way for me to see them is to click the (box?) and drag it elsewhere.

Perhaps I am missing a necessary property somewhere? Can you help me? I will attach my editor so you can see for yourself. Please look at the dialog called SPECIALDLG.

I am looking forward to the completion of this tool.
Paul


[attachment deleted by admin]
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Thanks for "live example" & interest. Now I know exactly where the problem is and what  it cause.
Quote from: PBrennick on December 06, 2006, 05:01:22 AM
If I doubleclick, the text shows for a split second.
...you see I had to subclass all the buttons that had BS_GROUPBOX style, because there is no other way to redraw that control, but handling WM_ERASEBKGND message (but maybe I will think of other way). So this is the cause of that redrawing
Quote from: PBrennick on December 08, 2006, 09:24:43 AM
...  because they become hidden. I cannot bring them back to the foreground. The only way for me to see them is to click the (box?) and drag it elsewhere.
... Please look at the dialog called SPECIALDLG.
I looked at SPECIALDLG script... To say truth, you should change its order (don't be mad of me...  ::) ) There is one thing you should consider when creating resource file & it's  Z-Order. Because "Information","Topics" are last CONTROLs in the file thay are brought to front and everything behind them aren't accessible.
When you click on one control my dialog editor hit-tests that point while enumerating all the child windows and makes active only that one which has "the biggest Z-Order" (meaning last item in the script or last enumerated) & is in appropriate position.
In near future I will add ability to change Z-Order of control (in other words bring something to front, back).

PBrennick

It is a two way street and I welcome constructive criticism. Can I use Resource Hacker to change the zOrder?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

yes, you can use ResHacker to accomplish it, just call popup-menu (edit control) & change Tab Order (equ Z-Order)...it will put one CONTROL into another position :)

PBrennick

Thanks and good fortune with your project. It will meet a great need.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Download once & 4ever. Added update manager will download & update necessary files with no pain. The program will delete itself after update, you will be asked only to restart (it). Update manager will pop-up automatically (unless you'll write update_check=0x00000000 in ini file). Unfortunately dialog editor isn't fully finished yet. And I'm having hard time with my studies (in university). So don't expect new version very soon  :'( But just in case start program once in a week and you'll be notified about new version if such exists...
EDIT > you can resize any child window with right mouse button (holding and dragging)

ecube

Wow that's fantastic!, I like the icons, color coding, and ease of use. Great job  :thumbu

ramguru

For those who aren't busy at the moment if you could test if RP update system works correctly, I would be grateful (I've just made a little update, but not major one)

devgeek


jj2007

Hi Ramguru,
Very nice work indeed!
I just tried RP_pre_alpha_0.4.0.zip with the GeneSys editor, and after a while it gave me an exception. You might also consider setting the updater to "manual" - an alert by ZoneAlarm is not something that creates confidence for a first time user...