Partager via


_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.

class _U_STRINGorID

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

_U_STRINGorID Members

ATL Class Overview