This forum is read-only. Please post new topics in our Q&A forum.

Corrupt dialog resource

General discussion about using Restorator.

Moderator: florian

Locked
deadlypencil
New User
Posts: 1
Joined: Sun Jun 18, 2006 5:11 pm

Corrupt dialog resource

Post by deadlypencil » Sun Jun 18, 2006 5:47 pm

Hi,

I found a problem where it would said "Corrupt Dialog Resource.". I ended up fixing the problem with another resource editor.

This is the code for the dialog box when it showed up corrupt

Code: Select all

1 DIALOG 6, 17, 372, 237
STYLE DS_SETFONT | DS_3DLOOK | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME | WS_MINIMIZEBOX
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Aranock Online"
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
FONT 8, "Times New Roman"
{
  PUSHBUTTON   "&Quit", 2, 322, 146, 37, 15, 0, WS_EX_NOPARENTNOTIFY
  EDITTEXT   18, 50, 32, 70, 10, NOT WS_BORDER, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
  AUTOCHECKBOX   "Sound Effects", 15, 306, 106, 54, 8, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "STATUS: OK", 42, 16, 96, 153, 43, 0, WS_EX_NOPARENTNOTIFY
  PUSHBUTTON   "Create New Account", 17, 144, 146, 82, 15, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "Name:", -1, 12, 34, 24, 8, 0, WS_EX_NOPARENTNOTIFY
  CONTROL "", -1, "STATIC", NOT WS_GROUP | SS_BLACKRECT | SS_CENTERIMAGE, 4, 5, 364, 230, WS_EX_NOPARENTNOTIFY
  LTEXT   "New Account", 998, 12, 12, 100, 8, 0, WS_EX_NOPARENTNOTIFY
  PUSHBUTTON   "&Load", 20, 56, 146, 36, 15, 0, WS_EX_NOPARENTNOTIFY
  PUSHBUTTON   "S&ave", 39, 100, 146, 36, 15, 0, WS_EX_NOPARENTNOTIFY
  PUSHBUTTON   "&Help", 40, 234, 146, 36, 15, 0, WS_EX_NOPARENTNOTIFY
  PUSHBUTTON   "&News", 41, 278, 146, 35, 15, 0, WS_EX_NOPARENTNOTIFY
  DEFPUSHBUTTON   "&Start", 1, 12, 146, 36, 15, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "Description:", -1, 12, 60, 46, 10, 0, WS_EX_NOPARENTNOTIFY
  EDITTEXT   21, 12, 70, 200, 20, NOT WS_BORDER | ES_MULTILINE, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
  AUTORADIOBUTTON   "Male", 19, 164, 40, 40, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Female", 22, 164, 52, 40, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Templar", 23, 244, 40, 50, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Mercenary", 24, 244, 52, 50, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Harakim", 25, 244, 64, 43, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Seyan'Du", 26, 244, 76, 50, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  RTEXT   -1, 12, 95, 160, 46, NOT WS_GROUP | SS_ETCHEDHORZ, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Full Alpha", 54, 244, 106, 50, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Partial Alpha", 55, 244, 118, 56, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "No Alpha", 56, 244, 130, 53, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Arch-Templar", 50, 300, 40, 60, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Arch-Harakim", 51, 300, 52, 60, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Warrior", 53, 300, 64, 60, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  AUTORADIOBUTTON   "Sorcerer", 52, 300, 76, 60, 8, NOT WS_TABSTOP, WS_EX_NOPARENTNOTIFY
  LTEXT   16, 15, 109, 154, 28, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "Password:", -1, 12, 48, 37, 8, 0, WS_EX_NOPARENTNOTIFY
  EDITTEXT   27, 50, 48, 70, 10, NOT WS_BORDER | ES_PASSWORD, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
  AUTOCHECKBOX   "Shadows", 28, 306, 118, 54, 8, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "Gender:", 0, 140, 30, 30, 8, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "Race:", 1, 220, 30, 24, 8, 0, WS_EX_NOPARENTNOTIFY
  LTEXT   "Settings:", 0, 220, 96, 60, 8, 0, WS_EX_NOPARENTNOTIFY
  CONTROL 4, 0, "STATIC", SS_BITMAP, 10, 169, 21, 18, WS_EX_NOPARENTNOTIFY
  CONTROL 4, 0, "STATIC", SS_BITMAP, 39, 178, 22, 19, WS_EX_NOPARENTNOTIFY
  CONTROL 1, 0, "STATIC", SS_BITMAP | SS_CENTERIMAGE, 19, 169, 334, 57, WS_EX_NOPARENTNOTIFY
  LTEXT   " Aranock Online (c) 2005", 0, 278, 21, 82, 9, 0, WS_EX_NOPARENTNOTIFY
  CONTROL 2, 1, "STATIC", SS_BITMAP | SS_CENTERIMAGE, 321, 9, 42, 10, WS_EX_NOPARENTNOTIFY
  LTEXT   " Aranock Online is licensed to reuse the material from", 2, 150, 10, 168, 11, 0, WS_EX_NOPARENTNOTIFY
}
I deleted these 2 objects in another resource editor and then I was able to open it up in yours.

Code: Select all

  CONTROL 4, 0, "STATIC", SS_BITMAP, 10, 169, 21, 18, WS_EX_NOPARENTNOTIFY
  CONTROL 4, 0, "STATIC", SS_BITMAP, 39, 178, 22, 19, WS_EX_NOPARENTNOTIFY
The program works perfectly fine without those 2 controls, I really have no clue what they do (if you know could you plz tell me), anyways thats what caused the corrupt message to my knowledge.

And it would be cool if you could make it so I didn't have to open it up in another resource editor to fix it. :(

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Post by florian » Thu Nov 16, 2006 7:36 pm

hi, sorry for the late reply, I haven't seen this post before!

indeed, Restorator cannot handle the posted dialog resource. For me, however, it was line 29 that caused the problem:
RTEXT -1, 12, 95, 160, 46, NOT WS_GROUP | SS_ETCHEDHORZ, WS_EX_NOPARENTNOTIFY
Usually, RTEXT starts with a text, see the last 2 LTEXT statements. Now it seems that whereever you got those RC resources, the initial text was optional, and I guess it's a good idea to allow this form of RTEXT and LTEXT syntax. Restorator 2007 will handle LTEXT/RTEXT without text.

Regarding the CONTROL statements you asked: they'll display an image with ID 4. Check out the BITMAP resources of the file, there should be an image with ID 4, one with 1, one with 2, ... The upcoming Restorator 2007 will show the images in the preview, too.

Regards,
Florian

Locked