Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control array of buttons

Status
Not open for further replies.

deb9

Programmer
Sep 21, 2005
8
US
Hi,

I would like to draw, at run time, a checkers board (8x8 squares with alternating colors). I would like each square to be a button and I would keep a handle to each of these 64 buttons in a control array of buttons.

I dont know how to create these 64 buttons at runtime in VC++. Is it possible? Could somebody show me a small piece of code of how to do this?

Thanks

Debbie
 
In Charles Petzold's "Programming Windows" there's a chapter about the mouse.

The programs CHECKER1.C and CHECKER2.C show a very simple example with 25 "buttons", all of which are white.

If you look on Petzold's site, the programs for the older books are available for download.

I think the Mouse programs were in Chapter 4 (for Win3.1) and Chapter 6 for Win95.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top