|
-
April 7th, 1999, 01:47 PM
#1
How to get Enter message in the edit control box??
I want to change the data and display when I hit enter in the edit control box in the dialog. Is there any way I can do that??
Thanks.
Amy
-
April 8th, 1999, 01:50 PM
#2
Re: How to get Enter message in the edit control box??
You must predefine your OnOK() function first so that it won't close your dialog every time you press Enter like that CMyDialog::OnOK() {}
Just define OnClickedOK() for example. After that handle the message WM_CHAR and do you stuff in OnChar();
-
April 9th, 1999, 05:34 AM
#3
Re: How to get Enter message in the edit control box??
Another way...
Derive new class from class CEdit
class CMyEdit : public CEdit
{
...
afx_msg void OnChar( UINT nChar, UINT nRepCnt, UINT nFlags );
}
and overwrite there virtual function : OnChar
inside this function check if enter was pressed
But u wont be able to set this control using
Class Wizard... U ll need to set it in : OnInitDialog function or :OnInitialUpdate
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
|