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

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

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

System::AnsiString::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::AnsiString::LoadStr loads the string from the current module (executable or shared library) 

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

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

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!