[Webinar] Streamline your web hosting managementRegister Today


String conversion

Posted on 2006-07-09
Medium Priority
Last Modified: 2012-06-22
How can I convert CString to COleVariant?

Problem statement:
Currently, i'm developing an MFC program that reads file status from files and wishes to display them in Excel format. However, the function I got needs and input of COleVariant.
In Summary, filestatus returns CString while the function for displaying excel requires COleVariant.
Is there a way to convert CString to COleVariant and vise versa?

Request.... for future reference, is there a site / link which holds codes in data format conversion? such as CString WCHAR WSTRING?

Thank you for reading.

Dozo yoroshiku Onegaishimasu.
Question by:Mauaka
  • 2
LVL 22

Accepted Solution

cookre earned 100 total points
ID: 17070690

Expert Comment

ID: 17070702

      CString strData = "hi";
      COleVariant Variant;
      Variant = strData;

its working.


Expert Comment

ID: 17070706

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question