Page 1 of 1

Variant to CString

Posted: Tue Sep 16, 2008 11:43 pm
by 9532498
I need to convert the title in the header to a CString to display in an Edit Box. How do I go about doing this. I access the title with

mChart->GetHeader().GetText.GetItem(0);

This returns a VARIANT object but I need to convert it to CString. Can someone point me to an example?

Thanks.

Posted: Wed Sep 17, 2008 8:59 am
by narcis
Hi nbp,

What about this?

Code: Select all

	CStrings tmp = m_Chart1.GetHeader().GetText();

Posted: Wed Sep 17, 2008 4:38 pm
by 9532498
Yes. That worked. Thanks.