|
-
Sep 18th, 2002, 08:07 PM
#1
Thread Starter
Fanatic Member
MFC Question
When you make a Dialog project, how do I override the "press enter then it exits" thingy? I can't seem to figure it out
Thanks 
Ok I think I've figured it out
I need to add it in the BEGIN_MESSAGE_MAP() thing, like ON_WM_PAINT()
etc
ON_WM_KEYPRESS()?
Edit:
I got it, but it's not detecting when Enter is pressed. I used "OnKeyPress" and "OnSysKeyDown". OnKeyPress works, but I can't seem to catch the enter key 
Code:
BEGIN_MESSAGE_MAP(CServerDlg, CDialog)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_KEYDOWN()
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CServerDlg::OnKeyDown(UINT one, UINT two, UINT three){
MessageBox("pressed key","key",MB_OK);
}
When I press enter, the message box doesn't show up, for all other keys, it does
Last edited by nabeels786; Sep 18th, 2002 at 08:36 PM.
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
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
|