#include "atlconv.h" ... // Ansi string. char* ptrStr = "Example"; // Unicode string. wchar_t* pUStr = 0; // Use this macro for Initializing the conversion. // Actually, some member variable initialization deep inside. USES_CONVERSION; // Convert Ansi to Unicode. pUStr = A2W( ptrStr ); // Convert Unicode to Ansi. ptrStr = W2A( pUStr );
‘The Journey’ is all about the different tastes and flavours…. wandering among the virtual streets…different Paths and Destinations… from Technology to Gadgets… from Humor to Practical Lessons…from Truth to Fictions… from current issues to market conditions… and wat’s not…
Monday, July 26, 2010
USES_CONVERSION.
In ATL there are some helper macros defined such as W2A() which is used to convert widechar to ansi and A2W which is used to convert ansi to WideChar. Before using this macros you should initialize the conversion by calling USES_CONVERSION. See the code snippet below.
Subscribe to:
Post Comments (Atom)
Health Benefits of Cashews
Benefits of Cashews. Healthy food is an integral part of healthy body. Regular exercises such as Yoga and healthy diet is important to...
-
Convert a string to double (atof and _wtof), integer (atoi, _atoi64, _wtoi and _wtoi64), or long integer (atol and _wtol). double atof( c...
-
CEdit Class Provides the functionality of a Windows edit control. class CEdit : public CWnd Details: An edit control is a rectangula...
-
VSFlexGrid Introduction The VSFlexGrid control is a powerful, full-featured grid. It provides new ways to display, edit, format, organi...
No comments:
Post a Comment