dickinsw
July 13th, 1999, 11:08 AM
By default, clicking the OK button on a CDialog with the mouse is equivalent to pressing the ENTER key when the OK button is highlighted. In other words, both events trigger CDialog::OnOK(). I have a subclassed CEdit control (CNumEdit described on this web site) which behaves differently depending on whether CDialog::OnOK is tiggered by a mouse click on the OK button, or by pressing the OK button. In the former case, the edit value is retrieved from the control, and in the latter case, the edit value is not retrieved. I thought of adding an OnKeyUp() handler in the subclassed CNumEdit class to detect the ENTER key activity, and then retrieve the edit value from the control, but this seems like a kludge. Does anyone have a suggestion on how best to retrieve edit values from a subclassed control using exisiting CDialog data exchange functionality??