Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

_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 note Important

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

class _U_STRINGorID

Name

Description

_U_STRINGorID::_U_STRINGorID

The constructor.

Name

Description

_U_STRINGorID::m_lpstr

The resource identifier.

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.

Header: atlwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.