In a vesrion of my app., i have a dialog box that has an edit control, a
combobox control and a disabled OK button.
the dialog class has a function func1, mapped to EN_CHANGE message,
which enables the button when text is entred in the edit control.
in the second version, i have hidden the edit control and made a second
function, func2, mapped to ON_CBN_EDITCHANGE, which enables or disables
the button following whether or not there is text in the combo control.
in the third version, i want to remove the code that enables and
disables the boutton from func2, and make func1 be called instead.
to do this, i used two ways but no one of them worked. The button is not
enabled.
methode 1:
i used the following code in func2:
pEdit->SendMessage(EN_CHANGE); // pEdit is a pointer on the hidden edit
control.
methode2:
i copied the text in the combo to the hidden edit control using
pEdit->SetWindowText.
how can i make both methods work ? where have i gone wrong ?
Thank you in advance.
Ajay
hassan wrote in message <36C32C91...@mail.com>...
Try:
pEdit->SendMessage(WM_COMMAND, MAKEWPARAM(pEdit->GetDlgCtrlID(),
EN_CHANGE) );