共用方式為


_U_STRINGorID Class

This argument adapter class allows either resource names (LPCTSTRs) or resource IDs (UINTs) to be passed to a function without requiring the caller to convert the ID to a string using the MAKEINTRESOURCE macro.

Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

class _U_STRINGorID

Members

Public Constructors

Name

Description

_U_STRINGorID::_U_STRINGorID

The constructor.

Public Data Members

Name

Description

_U_STRINGorID::m_lpstr

The resource identifier.

Remarks

This class is designed for implementing wrappers to the Windows resource management API such as the FindResource, LoadIcon, and LoadMenu functions, which accept an LPCTSTR argument that may be either the name of a resource or its ID.

The class defines two constructor overloads: one accepts a LPCTSTR argument and the other accepts a UINT argument. The UINT argument is converted to a resource type compatible with Windows resource-management functions using the MAKEINTRESOURCE macro and the result stored in the class's single data member, m_lpstr. The argument to the LPCTSTR constructor is stored directly without conversion.

Requirements

Header: atlwin.h

See Also

Other Resources

ATL Class Overview