May 04, 2024, 11:50:25 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Stringtable resource

Started by zaphod, November 11, 2009, 01:58:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zaphod

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 ??

sapero

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

zaphod

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 !