Sign in to follow this  

Dialog message box

This topic is 4587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi How to extract or find a sotred dialog box from EXE file. I have this EXE file it is for a game. When you run the game and during the game if you hit [ENTER] a dialog box pop ups to enter some chat. I would like to know where I can find this dialog box so I can edit its shape?or it's location on the screen.I appreciate your responce. here is some of the Char I found in the EXE file Communications versions for HOST and player %d match (%d) Rcvd Ready=%d from player %d PLAYER READY MSG CHAT: ChtPregame=%d PgmState=%d Msg=%s DISCARD: ChtPregame=%d PgmState=%d Msg=%s SendChatMsg FROM=%d TO=%d Text='%s' TXChat() Local chat add: %s Local chat single player add: %s

Share this post


Link to post
Share on other sites
A Windows executable consists of code and resources. Resources are bitmaps, icons, etc, and also dialogs. If you have Visual Studio you can just open a *.exe file and edit its resources (if it is not in use). The position of the dialog on screen is not part of the dialog resource; it is specified when the dialog is created. For that you'd have to reverse engineer some parts of the code. Note that all of this is illegal and I'm not encouraging you to do so.

The previous holds for standard Windows dialog boxes; I'm not sure what kind of a game it is but most modern games use custom user interfaces. In those cases a dialog is unlikely to be defined like this, but rather in a custom format. Also, even if using a standard Windows interface, the dialog may not be stored as a resource in the exe but as a resource in some DLL, in a file on disk, in a custom format, etc.

Greetz,

Illco

Share this post


Link to post
Share on other sites
Quote:
Original post by Illco
A Windows executable consists of code and resources. Resources are bitmaps, icons, etc, and also dialogs. If you have Visual Studio you can just open a *.exe file and edit its resources (if it is not in use). The position of the dialog on screen is not part of the dialog resource; it is specified when the dialog is created. For that you'd have to reverse engineer some parts of the code. Note that all of this is illegal and I'm not encouraging you to do so.

The previous holds for standard Windows dialog boxes; I'm not sure what kind of a game it is but most modern games use custom user interfaces. In those cases a dialog is unlikely to be defined like this, but rather in a custom format. Also, even if using a standard Windows interface, the dialog may not be stored as a resource in the exe but as a resource in some DLL, in a file on disk, in a custom format, etc.

Greetz,

Illco


First of all thanks for your response
Second The game I am using is Age of Empires Expansion "ROR"
Now as I said this game has a chat screen wit a dialog box approx length 4cm and 1/2 cm wide. all what I wanted is make this dialog box wider.
Now I have all the dll related to the game and found nothing to show this dialog box. IS windows user32.dll has to do with it?
I don't know.
Oh by the way I extracted all the SLP files related to the game and I found all the pics with the exaption to the Dialog box. Amazing that I found the .bmp background of this dailog box that can be edit it easly but it will have no effect on the white blinking dialo box.
Regards

Share this post


Link to post
Share on other sites
Quote:
Original post by zlatko_bre_1985
U can try with Resource Hacker it can edit windows dll,move buttons,etc..etc..
http://delphi.icm.edu.pl/ftp/tools/ResHack.zip
541 KB


I used resource hacker nothing found
Like Illco siad "the dialog may not be stored as a resource in the exe but as a resource in some DLL, in a file on disk, in a custom format, etc."

would somebody tell me what I should look for such as statement calls, codes, etc..

Share this post


Link to post
Share on other sites
There is no reason to PM me about this; it can all be discussed in the thread you created. This way others can reply as well and, moreover, other people can learn from this problem when they use the search function well. If it was to draw my attention to your problem then consider that I decide which threads to reply to and shoving your problem in my face is not moving you up on the list. But no offence taken as of yet.

That said, I'll repost your message here:
Quote:

I want to thank u for your help and I rated your responce!
here is what I found in the exe when I used 010 editor
10..pnl_edit::draw..
pnl_inp::draw...
pnl_lst::draw...
pnl_lst::draw_highlight_bar.
message panel
pnl_msg::draw
pnl_msg::render_to_image_buffer
%s.bmp
-----------------------
another thing I found
GetKeyState
PostQuitMessage
KillTimer
SetWindowTextA
SetCapture
ReleaseCapture
GetCapture
SetWindowLongA
PostMessageA

GetActiveWindow
WinHelpA
ClientToScreen
DSetRect
MessageBoxA
(SetCursorPos
CGetSysColor.K.SetSysColors..V.GetWindowLongA...MessageBeep...GetFocus....MoveWindow....CallWindowProcA...DrawTextEXA...GetCaretBlinkTime.<.
CloseClipboard...IsClipboardFormatAvailable....DrawTextA...getForegrundWindow...GetAsyncKeyState....GetKeyboardState..USER32.dll..
S.DeleteObject..%.GetDeviceCaps.U.GetTextMetricsA..SelectObject..7.CreateFontIndirectA.

Note: "..." indicate hex 00 00 00
--------------------------
Now is this chat box I'am looking for is somewher above?
which function calls this chat box


The latter part of your listing only lists default Windows functions. They are probably the result of the programmers including windows.h in their application. For example, MessageBoxA is just the ASCII-instance of the default Windows messagebox function.

The upper part may very well have to do with the game's GUI system. But as I have already posted, it is next to impossible to interpret such texts without further knowledge of the program. Yes, one of these functions might draw the dialog box. Probably not. If so, then it probably draws any custom dialog box in the application and it will rely on other data that defines the actual layout of the dialog box. As I said, this layout may be stored in various formats either in the EXE, DLL or elsewhere.

If the dialog has the appeal of a default Windows application, chances are it is stored as a standard Windows resource. Opening it in a resource editor or MSVC for that matter will reveal its layout. If the dialog has the appeal of the game, chances are it is stored in a custom format. In this case, I think there is little hope you will retrieve it.

Greetz,

Illco

PS: actually it did move you up on my list (this time that is).

Share this post


Link to post
Share on other sites
Thanks for the warning "Illco"
I will not PM you again unless you say so.
Anyway as I undersatnd from your high tech language
that latter part of my listing : MessageBoxA is the default Windows messagebox function.which has to do with USER32.DLL or any other DLL file. and has nothing to do with my chat message box that i'm searching for!!
Please note that when I hit enter the message box popup as plain looking box 5cm long 1/2 cm wide in the center of the screen. So it is diffently a default Windows application.
So if we agree that it is "standard Win32 message dialog box"
There must be an instruction telling me how wide it is and where shoud it appear on the screen
Now I used 010 editor to see what the exe has and below what I found:

%s.. D:\ROR\Com_hand.cpp.No MSG
Slot#%d
Ser#%d
Len=%d
DEST=%d,%d%d,%d,%d,%d,%d,%d...NewCmnd.
______________________
FindFirstFileA..KERNEL32.dll....
LoadCursorA.R.SetTimer..
/ .SetFocus..J.ShowWindow..q.SystemParametersInfoA...SendMessageA...FindWindowA...DestroyWindow...LoadStringA.*.GetMessageA....PeekMessageA....DispatchMessageA....TranslateMessage
-------------------------------------
IN the upper part>what is this %d is about
The lower part I believe it talks about something ??
I think it will be easer to send u the exe (1.4 MB) to see the whole picture
Finally:THANKS for moving me up on my list

Share this post


Link to post
Share on other sites
Quote:

So if we agree that it is "standard Win32 message dialog box" There must be an instruction telling me how wide it is and where shoud it appear on the screen.

That is true but it will be hard to find.

Quote:

IN the upper part>what is this %d is about

This is one way of building up strings from other strings, integers, floats and such. In particular, %d represents an integer value 'to be filled in'. So I could store in my application a string that says:

char szMessage[256] = "The integer has a value of %d.";

And then later on use it with printf or sprintf to display various integers:

int i = 8;
int j = -1;
printf( szMessage, i );
printf( szMessage, j );

/*
The output looks like this if I had put newlines in the buffer as well:
The integer has a value of 8.
The integer has a value of -1.
*/


Quote:

The lower part I believe it talks about something ??

The lower part lists even more Windows API functions.

Quote:

I think it will be easer to send u the exe (1.4 MB) to see the whole picture

Me too but please don't. I'm not here to figure it out for you; I am though willing to help you if there is some perspective for a solution. However, in all my posts I have been trying to tell you that this will be very hard to figure out. Given these odds, I'd personally would not spent as much time on figuring it out as I've spent replying in this thread.

Some hints for continueing this search purposefully:
1) Get a copy of Visual Studio or this program Resource Editor (see previous posts) and open the executable and accompanying dlls. Seek for a dialog resource that looks like what you want. If it is not there, it is simply not there.
2) Tackle this from another perspective: tell something about why you want this dialog so badly. Perhaps there are other ways to achieve what you want.
3) Give it up.

Quote:

Thanks for the warning "Illco" I will not PM you again unless you say so. Finally:THANKS for moving me up on my list.

This is good fun! I hope... No seriously; good luck in the search and consider the three points over there! Greetz,

Illco

Share this post


Link to post
Share on other sites
Hi Illco

I will follow your hints for continueing this search.
and I wil let you know the outcome.
It is hard for a man to learn and figure out C++
I wish u all the best.

Share this post


Link to post
Share on other sites

This topic is 4587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this