Click here to Skip to main content
Licence 
First Posted 22 Jul 2002
Views 66,225
Bookmarked 37 times

Enable/Disable a group of controls with one click

By | 22 Jul 2002 | Article
This article demonstrates a CButton derived class that is used to enable or disable a set of controls with a single click.

Introduction

This article demonstrates a CButton derived class that is used to enable or disable a set of controls with a single click. When the user clicks the button the class iterates through the list of controls registered with the button and toggles their enabled state.

How does it work

The CEAdvButton class contains a CArray of int elements ( control IDs ) and Disables/Enables the dialog elements in the list using its SetCheck() function..

How to use it

There only three functions:

void AddControlToList( int l_intID ); // Add a control in to the list of elements
void ClearList(); // Clear the all elements in the list
void SetCheck( int nCheck ); // Set the buttons check

Thank you for your attention, I hope this little class able to help you in the your hard work.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Pavel Sokolov

Web Developer

Russian Federation Russian Federation

Member

C++ programmer.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 23 Jul 2002
Article Copyright 2002 by Pavel Sokolov
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid