I copied code which creates a masked edit control. To return the time in a string rather than a COleDateTime object, the author says to use

CString string = m_editCtrl.GetTimeStr();

When I then try the following code,

CClientDC cDC(this);
cDC.TextOut(10,10, string);

my program crashes at TextOut statement. What am I doing wrong? How can I convert this CString into just a char string that I can then print?

Any response any one can give me will be greatly appreciated.