Solved

Move AnsiString to a char field in Borland C++

Posted on 2001-08-23
6
380 Views
Last Modified: 2011-09-20
Hi all,

I want to move a value from a Edit control on a form to a character field. How do I do this.

Cadex.
0
Comment
Question by:cadex
6 Comments
 
LVL 6

Expert Comment

by:MichaelS
ID: 6417650
GetWindowText API could help
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 6417757
You need use c_str function. Example:
void __fastcall TForm1::Edit1Change(TObject *Sender)
{
  AnsiString t = Edit1->Text;//Edit1-> TEdit control
  char *s = t.c_str();
  ....
}
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 6426062
I hope, you use c_str function.Alex
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Expert Comment

by:MichaelS
ID: 6427801
AlexVirochovsky, if you read guidlines for experts who propose answers probably you will notice than answer souldn't have words "if" and "I guess" and ....

You are not the first year here :)
0
 
LVL 11

Expert Comment

by:griessh
ID: 7022029
Dear cadex

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "AlexVirochovsky"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7040377
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

911 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

22 Experts available now in Live!

Get 1:1 Help Now