Click to See Complete Forum and Search --> : please explain how to use STRINGTABLE in a resource file?
cyprus106
12-06-2007, 04:20 PM
I have been having SO MUCH trouble finding an answer to this. And I've tried a hundred different thigns in code. I want to have a string table in my .res file, and then when my program executes put them into a TStringList (BCB). But I can't figure out how to do it and I have been very very unsuccessful trying to find a place that can tell me how.
Here's how the code is in a .RC file, just for kicks
STRINGTABLE
BEGIN
1000,"&DevX"
1010,"&Saved"
1020,"&MY"
1030,"&Life"
END
jonnin
12-07-2007, 12:14 AM
I am not sure of the exact syntax myself, but you can load a list box with default strings using the editor and then look at the resource file that it generates or just use that list box (you can use hidden items, its handy sometimes!) as a string table instead.
cyprus106
12-07-2007, 10:41 AM
TRuthfully, I was looking for the code, because I was trying to load it into a string table and it just wasn't working.
KrishnaPG
12-12-2007, 10:50 AM
Hello,
Have you tried LoadString() function??
The LoadString function loads a string resource from the executable file associated with a specified module, copies the string into a buffer, and appends a terminating NULL character.
int LoadString(HINSTANCE hInstance,
UINT uID,
LPTSTR lpBuffer,
int nBufferMax
) ;
All the Best.
Yours,
Palem Gopalakrishna http://www.geocities.com/krishnapg/
devx.com
Copyright Internet.com Inc. All Rights Reserved