Variant to CString

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

Variant to CString

Post by nbp » Tue Sep 16, 2008 11:43 pm

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Sep 17, 2008 8:59 am

Hi nbp,

What about this?

Code: Select all

	CStrings tmp = m_Chart1.GetHeader().GetText();
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

Post by nbp » Wed Sep 17, 2008 4:38 pm

Yes. That worked. Thanks.

Post Reply