NO

Author Topic: Resource Script file Corrupt after modification  (Read 3625 times)

careframe

  • Guest
Resource Script file Corrupt after modification
« on: April 12, 2008, 08:44:59 AM »
i have this problem.

step by step

new Project
chose Pocket PC Application.
name it
chose "hello world Program"
and click finish
open the main.rc and click on menu
double click on IDR_MNU_MAIN
click on the <> button
and open properties
rename it and look in the string table the new name was corrupt
and if you save all, close project and open again

the following message apear after open the main.rc again

Building main.rc.
C:\Program Files\PellesC\Projects\aaa\main.rc(25): error: Unknown keyword: 'I_IMAGENONE'.
Done.

and the file open in a text editable format

like this
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 5.00".

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "main.h"

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

DLG_ABOUT DIALOG DISCARDABLE 6, 18, 150, 110
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE
CAPTION "About aaa Program"
FONT 8, "Tahoma"
{
  CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON|WS_TABSTOP, 55, 85, 40, 14
  CONTROL "aaa Program", -1, "Static", SS_CENTER|WS_GROUP, 15, 10, 120, 8
  CONTROL "Developed by", -1, "Static", SS_CENTER|WS_GROUP, 15, 25, 120, 8
  CONTROL "Pelles C for Windows", -1, "Static", SS_CENTER|WS_GROUP, 15, 35, 120, 8
  CONTROL "Version 1.0", -1, "Static", SS_CENTER|WS_GROUP, 15, 60, 120, 8
}

IDR_MNU_MAIN SHMENUBAR
{
  IDR_MNU_MAIN, 1
  I_IMAGENONE, IDM_ABOUT, 0|TBSTATE_ENABLED, TBSTYLE_BUTTON|TBSTYLE_DROPDOWN|TBSTYLE_AUTOSIZE, IDS_ABOUT, 0, 0
}

IDR_MNU_MAIN MENU
{
  POPUP "Menu"
  {
    MENUITEM "About aaa Program", IDM_ABOUT
  }
}

IDR_ICO_MAIN ICON "main.ico"

IDR_ACC_MAIN ACCELERATORS
{
  81, IDM_EXIT, VIRTKEY, CONTROL
}

STRINGTABLE
{
  IDS_ABOUT, "Me??\x7?\x1c?F"
}

if they are possible to fix that bug
« Last Edit: April 12, 2008, 08:47:24 AM by careframe »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Resource Script file Corrupt after modification
« Reply #1 on: April 15, 2008, 05:59:43 PM »
Yes, thanks, I found this myself recently. The fix will be in the next beta (it was a buffer size problem: the IDE is using Unicode and wchar_t internally as of v5.0, but one size was still being calculated for char -- bad, bad dog.)
/Pelle

gstamm

  • Guest
Re: Resource Script file Corrupt after modification
« Reply #2 on: September 03, 2008, 02:52:11 PM »
I have the same problem with a project for Windows Mobile. How can I get back to the resource editor?
Thanks in advance.
Georg

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Resource Script file Corrupt after modification
« Reply #3 on: September 23, 2008, 07:11:42 PM »
This was a problem in beta #1 (IIRC) leading up to version 5.0. In other words, I doubt you can have the exact same problem in the released version. So the obvious question is: what is the problem you actually have?
/Pelle

Ligaron

  • Guest
Re: Resource Script file Corrupt after modification
« Reply #4 on: October 23, 2008, 03:04:13 PM »

Pelles C for Windows
Version 5.00.8


I create new project "Test" as "A simple program":
File - New - Project... - Pocket PC Application Wizard

I save and close my project:
DblClick "main.rc"
File - Save All
File - Close Project

I open my project:
File - Open

File "main.rc" open in a text editable format.


If I close project and delete these lines in file "main.rc":

IDR_MNU_MAIN SHMENUBAR
{
  IDR_MNU_MAIN, 1
  I_IMAGENONE, IDM_ABOUT, 0|TBSTATE_ENABLED, TBSTYLE_BUTTON|TBSTYLE_DROPDOWN|TBSTYLE_AUTOSIZE, IDS_ABOUT, 0, 0
}

project open ok.