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!

Enabling/Disabling a TextBox in a Dialog

Status
Not open for further replies.

rdg2cig

Programmer
Sep 16, 1999
22
US
I would like a textbox in a dialog to be controlled by the status of a radio button on the same dialog. In other words, if the button is clicked, the textbox is active and text may be entered but if the button is not clicked, the text box is inactive and the user can not enter text. How is this done?
 
Save the state of the radiobutton. On initdialog use the saved state to determine whether to enable/disable the text control using its EnableWindow() method. Then, add a member function for BN_CLICKED on the radiobutton and depending on whether you are setting it on or off, enable or disable the other window appropriately.<br>
<br>
cpm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top