Page 1 of 1

Load a string alert by res (Resolved)

Posted: Fri Aug 30, 2013 12:34 pm
by arthursilvestre
Good morning, I want to load a string that is contained in my file *. Res (whatever is in html, string table, etc..). There is that possibility? already very grateful.

Re: Load a string alert by res

Posted: Mon Sep 02, 2013 9:40 am
by Biel EA6DD
To retireve from String table, you can use FW function LoadString.

Re: Load a string alert by res

Posted: Mon Sep 02, 2013 12:45 pm
by Antonio Linares
Arthur,

as Biel pointed, here you have an example:

MsgInfo( LoadString( GetResources(), 10 ) ) // where 10 is the ID of the string in the resource file

test.rc

Code: Select all

STRINGTABLE 
BEGIN
    10, "Testing strings loading from Resources"
    20, "02/27/94"
END

Re: Load a string alert by res

Posted: Mon Sep 02, 2013 1:29 pm
by arthursilvestre
Good morning, I did this test and it worked, but there is a character limitation correct? is there any way that there is no such limitation? this linhares your code is the file DCDATA right?

Re: Load a string alert by res

Posted: Mon Sep 02, 2013 2:05 pm
by Antonio Linares
Arthur,

What limitation do you mean ?

You can use PellesC resources editor to easily build it

Re: Load a string alert by res

Posted: Mon Sep 02, 2013 2:13 pm
by arthursilvestre