RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStringT::LoadStr Method (HINSTANCE, int)

Loads a string from the compiled resources of a specified module.

Pascal
function LoadStr(ident: Integer): AnsiStringT; static;
function LoadStr(hInstance: HINSTANCE; ident: Integer): AnsiStringT; static;
C++
static __fastcall AnsiStringT LoadStr(int ident);
static __fastcall AnsiStringT LoadStr(HINSTANCE hInstance, int ident);

System::AnsiStringT::LoadStr loads a specified string resource. 

ident is the resource identifier of the string. 

hInstance is the instance handle of the module that contains the string resource. If hInstance is not given, System::AnsiStringT::LoadStr loads the string from the current module (executable or shared library) 

If the string resource does not exist, System::AnsiStringT::LoadStr returns an empty string. 

Moving display strings into string resources makes an application easier to localize without rewriting the program. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!