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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Check Boxes at Startup?????

Status
Not open for further replies.

noaaprogrammer

Programmer
May 4, 2001
36
US
I have a dialog box with an assortment of check boxes on it. When the program is run, I would like some of the check boxes to be checked when the dialog box first appears. Does anyone know how this can be accomplished?
 
If you use the DDX (Dialog Data Exchange) mechanism, you can set the initial values of the dialog object's member variables, typically in your OnInitDialog handler or the dialog constructor. The check boxes will be checked when you show the dialog.
 
Thanks for the help guys. I figured it out. All it took was these simple function call in "OnInitDialog" :
CheckDlgButton(IDC_ALL , 1 );
CheckDlgButton(IDC_printer , 1 );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top