By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 947 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

VC2005, please help me with TextBox and Label controls

P: 27
Hi all,

I simply cant manage to read / write value from controls (TextBox, Label ...) in Visual C++.

I am new to Visual C++ so please explain! How to get a value from user (TextBox) into my char* or int type variable and how to print it out (Label) ?
I found out I can do:

String^ str = "Hello";
label1->Text = str;

but nothing more.

Why does microsoft made up System::String^ type and why I cant do simple conversions from and into this type? (like to char* , to int , to float, to whatever and backwards?)

What am I missing? Is there any library with nice functions I should include?

In C++ Borland Builder Ansistring type exists and I can happily play all around with strings. It is also easy to use all C standard library (stdio.h and string.h) or iostream for me. But how to work with strings in Microsoft Visual C++ (not console but in desktop applications)? Help me with this mystery please!

Nov 1 '06 #1
Share this Question
Share on Google+
2 Replies

P: 73
What u are using is something called managed c++ it is not std c++.
U 'd better use What Microsoft provide to do ur conversion
Nov 2 '06 #2

P: 27
Thanks for reply, but how to move form managed C++ to std C++? Where can I find it out? What should I install or include? I know there must be something that provide these essential conversions.
Can you explain it more please?
Nov 2 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.