Changing The Caption of A button?

IS it posssible useing Borland c++ 5.02 owl library to change the caption of a button. All i want to do is change it form blank to eith er "X" or "O" (Im writing Tic Tac Toe). IS this possible and if it isnt what is the best way to do this. Thanks
LVL 1
ziggy_9mmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
Hmm, obtain the window handle of the button and call 'SetEindowText()'...
0
nietodCommented:
That would be SetWindowText().
0
jkrCommented:
Thanx for the correction ;-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

jkrCommented:
Ooops, this should have been a comment (let's blame the 'new look')
0
AlexVirochovskyCommented:
You have 2 Options:
void TCalc::UpdateDisplay()
{
  char  str[DisplayDigits + 2];
........//form str
            //1. without using TButton:
  ::SetWindowText(GetDlgItem(ID_DISPLAY), str);
                    //or
  tButton->SetWindowText(str);
         //where tButton = new TButton(this,ID_DISPLAY);// in Constructor
}
If you have more Questions about
OWL, you can ask in OWL Area.
Alex
0
LucHoltkampCommented:
alex, that would be:
::SetWindowText(::GetDlgItem(ID_DISPLAY), str); or better
GetDlgItem(ID_DISPLAY)->SetWindowText(str);

But why don't you make you're buttons in the resource editor? and use a dialog instead of a normal window...
Look at the examples for how to make a dialog.
Luc
0
LucHoltkampCommented:
Ah, wait...
You want the button to change when you click on it!
Sorry, that won't go in the resource editor...
However you could also use bitmaps, that will look a lot better.
If you want to know how, we hear from you :-)
Luc
0
AlexVirochovskyCommented:
Luc, i see , that you use OWL many many
time ago...
0
ziggy_9mmAuthor Commented:
thanx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.