-
December 11th, 2009, 10:19 PM
#1
[RESOLVED] WM_KEYDOWN VK_RETURN problem
Hi!
I have a WinAPI application that creates a dialogbox from a template. this dialogbox contains a custom control, that I implement myself. This custom control contains two editboxes (created dynamically). The editboxes are single-line.
The problem I have is that I need to receive VK_RETURN in the message WM_KEYDOWN (not after the button has been released) in the window procedure of the editbox (I have subclassed the editboxes to handle events) and I can't.
Using Spy++, I have seen that the editbox DOES post the message, but I do not receive it in my "case WM_KEYDOWN:" section of EditProcedure. However, i receive WM_KEYUP when I press VK_RETURN and WM_KEYDOWN when I press VK_BACK.
can anybody give me an idea about what to do?
I am using VC++ 2008.
-
December 12th, 2009, 10:31 AM
#2
Re: WM_KEYDOWN VK_RETURN problem
Do your editboxes have the style ES_WANTRETURN?
-
December 12th, 2009, 05:39 PM
#3
Re: WM_KEYDOWN VK_RETURN problem
Yeah, unfortunately, it happens as the documentation says:
"This style has no effect on a single-line edit control." - it works only with a multiline editbox.
-
December 13th, 2009, 12:01 AM
#4
Re: WM_KEYDOWN VK_RETURN problem
Afraid you need WH_MSGFILTER local hook.
Best regards,
Igor
-
December 18th, 2009, 01:03 AM
#5
Re: WM_KEYDOWN VK_RETURN problem
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
|