C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-07-2009, 08:56 AM   #1
Registered User
 
Join Date: Mar 2009
Posts: 71
Converting textBox1->Text into a basic string.

Converting textBox1->Text into a basic string.
How would I do this in Visual C++ 9?
azjherben is offline   Reply With Quote
Old 06-07-2009, 09:28 AM   #2
Student
 
legit's Avatar
 
Join Date: Aug 2008
Location: UK -> Newcastle
Posts: 156
This is extremely vague, unless it's just me. I think that we need more info...
legit is offline   Reply With Quote
Old 06-07-2009, 10:56 AM   #3
Registered User
 
Join Date: Mar 2009
Posts: 71
No not really.
I just need to know how to convert a string^ to a basic string, in Visual C++ 9.
azjherben is offline   Reply With Quote
Old 06-07-2009, 03:53 PM   #4
Student
 
legit's Avatar
 
Join Date: Aug 2008
Location: UK -> Newcastle
Posts: 156
Quote:
Originally Posted by azjherben View Post
No not really.
I just need to know how to convert a string^ to a basic string, in Visual C++ 9.
I'm not sure what you mean... You want to convert a string^ to a basic string? What's the difference? I'm not really a Visual guy, so I'm sure others would love to help!
legit is offline   Reply With Quote
Old 06-07-2009, 08:13 PM   #5
tjb
Registered User
 
Join Date: Jan 2009
Posts: 31
I'm not an expert on C++/CLI, but I would imagine that the way you would do it is similar to the way you would convert a .NET string to a byte array. System::Text::ASCIIEncoding::GetBytes may be a start, if you're looking at 8-bit extended ASCII characters. I believe there is a text conversion helper function that makes this even easier.
tjb is offline   Reply With Quote
Old 06-07-2009, 08:27 PM   #6
Registered User
 
Join Date: Dec 2007
Posts: 43
Not to mention textBox1 is an instantiation of... what class? Tons of toolkits have a text-box component: wxWidgets, FOX, FLTK, .NET Forms...
Chris87 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Inheritance Hierarchy] User Input on program with constructors. How ? chandreu C++ Programming 8 04-25-2008 02:45 PM
We Got _DEBUG Errors Tonto Windows Programming 5 12-22-2006 05:45 PM
Message class ** Need help befor 12am tonight** TransformedBG C++ Programming 1 11-29-2006 11:03 PM
Something is wrong with this menu... DarkViper Windows Programming 2 12-14-2002 11:06 PM


All times are GMT -6. The time now is 03:00 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22