Convert string to LPCTSTR ...
This is a problem that I have encountered many times in coding, especially when code with the MFC. I try to find on Internet but have some way to complex for a small problem.
Finally, I and my friend found out a simple way but very effective.
LPCTSTR ConvertFromString (string strVar){// Convert string to CStringCString tmp(strVar.c_str());// Use CString like LPCTSTRreturn tmp;}