views:

69

answers:

1

In my project i have 2 radio button "File" and "not File" and i also hav a textbox called "width"..

I need to disable the text box when i click on "not file" radio button and once i click "file" radio button it should enable the textbox..

Can u tell me the function in Windows programming in visual c++

EDIT : "Add variable" is disabled when i right click on the textbox

+1  A: 

Attach a CTextBox member variable to your text box. Say m_tbWidth. You can do this by right clicking on the textbox in the dialog designer and selecting "Add variable..."

In the handler for File, enter the line m_tbWidth.EnableWindow( TRUE );

And in the handler for NotFile, enter the line m_tbWidth.EnableWindow( FALSE );

Paul Mitchell