Solved

Move AnsiString to a char field in Borland C++

Posted on 2001-08-23
6
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

710 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