Solved

String conversion

Posted on 2006-07-09
3
455 Views
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.
0
Comment
Question by:Mauaka
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 50 total points
ID: 17070690
0
 
LVL 3

Expert Comment

by:Raj_Kau
ID: 17070702


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

its working.

Raj
0
 
LVL 3

Expert Comment

by:Raj_Kau
ID: 17070706
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
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.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now