MFC Programming(Edit Box Controls)
Posted on 2001-08-06
I have a dialog based application. The dialog has two edit boxes and one command button. I want the command button to be active only when both of the edit boxes are not empty.(If both edit boxes empty the button is disabled)
I added a subclass to the project that drives from CEdit and are tied to the Edit boxes. I added the following
void CEditText::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
CEdit::OnChar(nChar, nRepCnt, nFlags);
When a key is pressed "Key Pressed" is displayed as desired. But I can't now test the other input box to see if is empty.
What is the best approach for a solution.