Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: window handle of a key pressed Pin
Code-o-mat22-Apr-10 4:46
Code-o-mat22-Apr-10 4:46 
My guess is that your hook gets called before the program actuyally routes the message towards any window. I don't know by heart how keyboard events are routed but my guess would be that they are targeted at the window owning the input focus. So try experimenting with the window returned by GetFocus[^], or try a different hook, like WH_GETMESSAGE, at this point i believe you can check weather the message is WM_KEYDOWN, WM_KEYUP or somesuch and hande it as you like.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <

GeneralRe: window handle of a key pressed Pin
Srivathsa_22-Apr-10 4:48
Srivathsa_22-Apr-10 4:48 
AnswerRe: window handle of a key pressed Pin
Stephen Hewitt22-Apr-10 5:11
Stephen Hewitt22-Apr-10 5:11 
QuestionHow can I change an icon on toolbar dynamically Pin
Software200722-Apr-10 3:06
Software200722-Apr-10 3:06 
AnswerRe: How can I change an icon on toolbar dynamically Pin
Eugen Podsypalnikov22-Apr-10 3:26
Eugen Podsypalnikov22-Apr-10 3:26 
GeneralRe: How can I change an icon on toolbar dynamically Pin
Software200722-Apr-10 4:18
Software200722-Apr-10 4:18 
GeneralRe: How can I change an icon on toolbar dynamically Pin
Eugen Podsypalnikov22-Apr-10 4:21
Eugen Podsypalnikov22-Apr-10 4:21 
GeneralRe: How can I change an icon on toolbar dynamically Pin
Software200722-Apr-10 4:46
Software200722-Apr-10 4:46 
GeneralRe: How can I change an icon on toolbar dynamically Pin
Eugen Podsypalnikov22-Apr-10 4:53
Eugen Podsypalnikov22-Apr-10 4:53 
GeneralRe: How can I change an icon on toolbar dynamically Pin
Software200722-Apr-10 5:06
Software200722-Apr-10 5:06 
GeneralRe: How can I change an icon on toolbar dynamically Pin
Eugen Podsypalnikov22-Apr-10 5:28
Eugen Podsypalnikov22-Apr-10 5:28 
Questionstd::string format Pin
gmallax22-Apr-10 2:03
gmallax22-Apr-10 2:03 
AnswerRe: std::string format Pin
Cedric Moonen22-Apr-10 2:18
Cedric Moonen22-Apr-10 2:18 
AnswerRe: std::string format Pin
Stuart Dootson22-Apr-10 5:09
professionalStuart Dootson22-Apr-10 5:09 
QuestionFind the windows Pin
Cvaji22-Apr-10 0:13
Cvaji22-Apr-10 0:13 
AnswerRe: Find the windows Pin
Code-o-mat22-Apr-10 0:21
Code-o-mat22-Apr-10 0:21 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 0:31
Cvaji22-Apr-10 0:31 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 0:38
Code-o-mat22-Apr-10 0:38 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 0:48
Cvaji22-Apr-10 0:48 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 1:00
Code-o-mat22-Apr-10 1:00 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 5:27
Cvaji22-Apr-10 5:27 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 6:16
Code-o-mat22-Apr-10 6:16 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 6:40
Cvaji22-Apr-10 6:40 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 6:44
Code-o-mat22-Apr-10 6:44 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 6:54
Cvaji22-Apr-10 6:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.