|
-
Feb 19th, 2002, 09:14 AM
#1
Thread Starter
Fanatic Member
key down
Whenever I have an object on the window, for instance an EDIT, BUTTON, whatever, I try to use:
Code:
switch(msg){
case WM_KEYDOWN:
MessageBox(hwnd,"Hey sob","",0);
break;
}
It just doesn't seem to work. Anyone know why? I suppose it's because the focus is not onto the main window, rather to the EDIT OR WHATEVER.

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Feb 19th, 2002, 09:45 AM
#2
yep right.
Since I don't know where this code you posted is, I cannot give any precise answer, but your guess seems right.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 19th, 2002, 02:47 PM
#3
Thread Starter
Fanatic Member
Originally posted by CornedBee
yep right.
Since I don't know where this code you posted is, I cannot give any precise answer, but your guess seems right.
I'm sorry?
I just have a question: "Once I have controls on a window, the default switch(msg){case WM_KEYDOWN} just seem don't work"

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Feb 19th, 2002, 05:02 PM
#4
"The keydown messages are only sent to the window that has the input focus. Once you created controls, there is a good chance that one of them has the input focus."
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|