Creating Buttons? (newbie question) 
Author Message
 Creating Buttons? (newbie question)

I'm creating a Dialog Based Application which is supposed to interact with
my Logic Engine.  I already found out how to interact with her over the
parallel port (yepiii!:).

I will need 160 checkboxes (yes, that's a lot - maybe even a couple more),
which will do calls like this:
lewrite(short addr, unsigned char data)
where addr is 000100 to 010111 and data is 00000000 to 11111111.  So meaning
I have 20 * 8 set's of checkboxes (two dimensional array?).

I'm not very experienced with VC++ (got Version 6.0), I only know how to use
the ClassWizard to create buttons.  And my experience only lets me solve my
problem  by creating 160 buttons (w/Class Wizard) with each having it's own
function that each has a lewrite() function.

There has to be a much easier way (and more efficient in case I want to
modify the code at any point) - any suggestions?
I guess I could create buttons manually with CButton but I didn't get too
far with that.  To me what the Wizards do is really Magic.  So if CButton is
a right way I would appreciate a tutorial on how to set a button up and
hints how I could solve my problem with that.

Thank you very much, I appreciate any help.


Sun, 27 May 2001 03:00:00 GMT  
 Creating Buttons? (newbie question)
You can make your own derived class for a CheckBox. In that class you can
make your own
methodes for lewrite, ...
When you create your DialogBox you can use the Create-methode of the

Ex.  with button

    CButton *button;

    button = new CButton (...);
    button->Create (...);

You can put this code in a loop, so you can build your 160 checkboxes.

Mon, 28 May 2001 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. how to create a window without any close button (include OK button and X button)

2. Newbie question: Radio Buttons

3. Linking FileOpen dialogue to a button-newbie question

4. Disabling Buttons on a DialogBar (newbie question)

5. newbie question How to Close app when Press Button

6. newbie question: putting an icon on a button

7. Silly Newbie Question - Radio Buttons

8. Newbie : button question...

9. Newbie question: using malloc() to create a string?

10. creating files---newbie question

11. Help on creating Tables, Fields, Etc...(newbie question)

12. ATL newbie creating VB like collection question


Powered by phpBB® Forum Software