|
-
July 13th, 1999, 11:08 AM
#1
CEdit subclass
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??
-
July 13th, 1999, 02:10 PM
#2
Re: CEdit subclass
How you reach OnOK() shouldn't really matter... I'd look at the examples on my web site which deal with subclassing CEdit and see how they're done... You shouldn't have to do anything special.
Check out Examples 5 and 14 at http://home.earthlink.net/~railro/mfc_link.html.
Rail
Recording Engineer/Software Developer
Rail Jon Rogut Software
[email protected]
http://home.earthlink.net/~railro/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|