I am building my application in UNICODE mode and want convert CString to LPWSTR.Basically i have one one class containing CString as member variable like,
class MyClass
{
CString TreeNodeName;
}
And i want to use following structure for inserting item into tree control,
TVINSERTSTRUCT tvInsert;
tvInsert.hParent = ParentNode;
tvInsert.hInsertAfter = NULL;
tvInsert.item.mask = TVIF_TEXT;
tvInsert.item.lParam = (long)ClassObject;
tvInsert.item.pszText = ClassObject->TreeNodeName; //Need this conversion
Please help me how to convert CString TreeNodeName; to tvInsert.item.pszText ?
TreeNodeNamefrom. - john