The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => Miscellaneous Projects => Windows Projects => Topic started by: ramguru on November 29, 2006, 09:51:28 PM

Title: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on November 29, 2006, 09:51:28 PM

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
(http://img20.imageshack.us/img20/3969/projecttr6.gif)
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 (http://www.lila-center.info/))
Improved synchronization with script window
Added update manager (thanks to Ehtyar)



[attachment deleted by admin]
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: six_L on December 01, 2006, 08:29:05 AM
hey,ramguru
good work!  :U
it is better than EXESCOPE.
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on December 04, 2006, 09:20:28 PM
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.
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: PBrennick on December 06, 2006, 05:01:22 AM
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
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on December 06, 2006, 07:01:59 PM
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...
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: PBrennick on December 08, 2006, 09:24:43 AM
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]
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on December 08, 2006, 01:53:01 PM
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).
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: PBrennick on December 08, 2006, 02:16:37 PM
It is a two way street and I welcome constructive criticism. Can I use Resource Hacker to change the zOrder?

Paul
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on December 08, 2006, 02:21:54 PM
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 :)
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: PBrennick on December 09, 2006, 01:59:18 PM
Thanks and good fortune with your project. It will meet a great need.

Paul
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on December 16, 2006, 05:32:12 PM
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)
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ecube on December 21, 2006, 07:54:31 PM
Wow that's fantastic!, I like the icons, color coding, and ease of use. Great job  :thumbu
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: ramguru on March 15, 2007, 09:52:02 PM
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)
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: devgeek on May 22, 2007, 05:07:50 PM
The update worked perfect for me.
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: jj2007 on March 23, 2008, 09:58:40 AM
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...
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: caseys on December 26, 2010, 08:39:48 PM
old thread. just wanted to say that this tool has several bugs, but the idea and graphics are pretty =]
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: hfheatherfox07 on May 17, 2012, 06:58:52 PM
any body still has this ?
the attachment is gone
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: dedndave on May 17, 2012, 09:04:17 PM
http://www.masmforum.com/archive2012/
it's probably in there someplace
i see a few files with "rp" in the names
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: dedndave on May 17, 2012, 09:05:42 PM
this is probably it
http://www.masmforum.com/archive2012/3305_RP_pre_alpha_0_4_0.zip
Title: Re: Resource creator/editor/previewer [ Code Name - "RP" ]
Post by: hfheatherfox07 on May 17, 2012, 09:07:59 PM
Than this is not it .... there was a resource editor posted here with the source I downloaded it but I can not find it