Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
ATL/MFC
CStringT Class
Methods
 CStringT::LoadString
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Shared Visual C++ Classes Reference 
CStringT::LoadString 

Reads a Windows string resource, identified by nID, into an existing CStringT object.

BOOL LoadString(
   HINSTANCE hInstance,
   UINT nID,
   WORD wLanguageID
);
BOOL LoadString(
   HINSTANCE hInstance,
   UINT nID
);
BOOL LoadString(
   UINT nID
);

Parameters

hInstance

A handle to the instance of the module.

nID

A Windows string resource ID.

wLanguageID

The language of the string resource.

Nonzero if resource load was successful; otherwise 0.

Loads the string resource (nID) from the specified module (hInstance) using the specified language (wLanguage).

#define IDS_FILENOTFOUND 1
//typedef CStringT< TCHAR, StrTraitATL< TCHAR > > CAtlString;

CAtlString s;
s.LoadString( IDS_FILENOTFOUND );

For another example, see ShowLocalized.

Reference

CStringT Class

Other Resources

CStringT Members

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker