Link to home
Start Free TrialLog in
Avatar of LordDamein
LordDamein

asked on

Inserting ComboBox text into a MessageBox

I have created a program where the user selects a time limit radio button, a skill from a ComboBox, then clicks a start button to start the timer.  When the timer has ran down the start button is re-enabled, the timer reset and a messagebox pops up to announce the ending of the time limit.

My problem is:
I want to add into the MessageBox the skill chosen from the ComboBox.  (i.e. "Your timer for "[ComboBox choice]" has expired.")  I want this feature since the user has the option of running multiple timers for multiple ComboBox choices and it would be nice if they knew which timer had expired.

I have tried everything that I can think of, looked through the search here, and other places.  The closest I get to my goal is getting the error:

[C++ Error] Main.cpp(558): E2034 Cannot convert 'AnsiString' to 'char *'.

(Borland C++ Builder 4.0)

Once I get my messageboxes working properly my program is done.  Please help me....
ASKER CERTIFIED SOLUTION
Avatar of thienpnguyen
thienpnguyen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LordDamein
LordDamein

ASKER

That was perfect, Thanks.

Going off of your example I was able to create a function to handle all possible timers and end them with a functional messagebox.