Really Easy : How do you reference a control ?
Posted on 1998-12-12
I have a resource file that contains a dialog box which in turn contains 3 Text boxes (Edit Controls) and a button. When the button is clicked I want to disable the text boxes.
There is only one dialog for the entire application (done with CreateDialogParam). When the user clicks on the button I receive the windows message and the handle to the button : I need to use the EnableWindow API but how do I pass it the hWnd of the Text boxe ?
here is some sammple code (in BASIC) :
SELECT CASE LOWRD(wParam)
'== [ Start/Abort Button Clicked ] ==
IF HIWRD(wParam) = %BN_CLICKED THEN
Dim cbtnText as ASCIIZ * 256
Dim iRCLen as Integer
iRCLen = GetWindowText (lParam,cbtnText,255)
if left$(cbtnText,iRCLen) = "&Start Router" then
'<< Diable Text Boxes >>