IonicWind Software

IWBasic => General Questions => Topic started by: zaphod on November 11, 2009, 01:58:31 AM

Title: Stringtable resource
Post by: zaphod on November 11, 2009, 01:58:31 AM
Hello,
I try to use stringtable resource in EB.

I create rc file like that :
stringtable
begin
1 "string1"
2 "string2"
end

Add this file in project resource into Custom, custom type : resstring, id=1

And i try to read with loadstring like that :
handle=_getmodulehandle(0)
_loadstring(handle, 1,s,50)
(s:string)

That dont work...
Someone can help ??
Title: Re: Stringtable resource
Post by: sapero on November 11, 2009, 02:21:07 AM
Stringtable script should be IN your primary .rc file, not as imported file with unsupported Custom type. It can be also included

Edit your primary rc file with any text editor, scroll to the end and paste the string table:
// this is your icon
101 ICON "window.ico"

// add this
stringtable // important - stringtable is a well known type of resurce
begin
1 "string1"
2 "string2"
end

You can also include the stringtable if you have it in separate file:// this is your icon
101 ICON "window.ico"

// add this
#include "stringtable.rc" // relative to current .rc file, or full path
Title: Re: Stringtable resource
Post by: zaphod on November 11, 2009, 03:15:35 AM
thx sapero,

It appear that it need to write :
STRINGTABLE
BEGIN
1 "string 1"
2 "string 2"
END

Uppercase is needed...
But that work... nice !