CString::LoadString

BOOL LoadString( UINT nID );
throw( CMemoryException );

Return Value

Nonzero if resource load was successful; otherwise 0.

Parameters

nID

A Windows string resource ID.

Remarks

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

Example

The following example demonstrates the use of CString::LoadString.

// example for CString::LoadString
#define IDS_FILENOTFOUND 1
CString s;
if (! s.LoadString( IDS_FILENOTFOUND ))
{
    AfxMessageBox("Error Loading String: IDS_FILENOTFOUND");
    ...
}

CString OverviewClass MembersHierarchy Chart