Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting the handle of active window in other thread Pin
dudedotnet9-Oct-07 23:55
dudedotnet9-Oct-07 23:55 
QuestionInserting an ActiveX control based TreeView into a CAD program Pin
larsgregersen4-Oct-07 6:03
larsgregersen4-Oct-07 6:03 
QuestionIs there a way to switch focus?? Pin
Kiran Satish4-Oct-07 5:42
Kiran Satish4-Oct-07 5:42 
AnswerRe: Is there a way to switch focus?? Pin
Mark Salsbery4-Oct-07 5:51
Mark Salsbery4-Oct-07 5:51 
GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish4-Oct-07 7:11
Kiran Satish4-Oct-07 7:11 
GeneralRe: Is there a way to switch focus?? Pin
Mark Salsbery4-Oct-07 7:30
Mark Salsbery4-Oct-07 7:30 
GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish4-Oct-07 11:30
Kiran Satish4-Oct-07 11:30 
GeneralRe: Is there a way to switch focus?? Pin
Mark Salsbery4-Oct-07 11:43
Mark Salsbery4-Oct-07 11:43 
Generally, the problem is that only one window at a time can
have keyboard focus.  In a dialog, it's usually one of the controls
in the dialog that has the keyboard focus, not the dialog itself.

This means you need to either

a) Handle the WM_KEYDOWNMESSAGE in the appropriate
window (control) (sub)class or

b) Override CWinApp::PreTranslateMessage() and filter every WM_KEYDOWN
that is sent on the thread.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish4-Oct-07 13:00
Kiran Satish4-Oct-07 13:00 
GeneralRe: Is there a way to switch focus?? Pin
Mark Salsbery4-Oct-07 13:09
Mark Salsbery4-Oct-07 13:09 
GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish5-Oct-07 7:33
Kiran Satish5-Oct-07 7:33 
GeneralRe: Is there a way to switch focus?? Pin
Mark Salsbery5-Oct-07 7:38
Mark Salsbery5-Oct-07 7:38 
GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish5-Oct-07 9:36
Kiran Satish5-Oct-07 9:36 
GeneralRe: Is there a way to switch focus?? Pin
Mark Salsbery5-Oct-07 9:42
Mark Salsbery5-Oct-07 9:42 
GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish5-Oct-07 9:51
Kiran Satish5-Oct-07 9:51 
GeneralRe: Is there a way to switch focus?? Pin
Mark Salsbery5-Oct-07 10:08
Mark Salsbery5-Oct-07 10:08 
GeneralRe: Is there a way to switch focus?? Pin
Kiran Satish8-Oct-07 5:55
Kiran Satish8-Oct-07 5:55 
QuestionDeque using elements from a class Pin
PolarFuzz4-Oct-07 5:10
PolarFuzz4-Oct-07 5:10 
QuestionRe: Deque using elements from a class Pin
David Crow4-Oct-07 5:33
David Crow4-Oct-07 5:33 
AnswerRe: Deque using elements from a class [modified] Pin
George L. Jackson4-Oct-07 5:54
George L. Jackson4-Oct-07 5:54 
GeneralRe: Deque using elements from a class Pin
led mike4-Oct-07 6:20
led mike4-Oct-07 6:20 
GeneralRe: Deque using elements from a class Pin
George L. Jackson4-Oct-07 6:32
George L. Jackson4-Oct-07 6:32 
GeneralRe: Deque using elements from a class Pin
led mike4-Oct-07 7:20
led mike4-Oct-07 7:20 
AnswerRe: Deque using elements from a class Pin
led mike4-Oct-07 6:17
led mike4-Oct-07 6:17 
AnswerRe: Deque using elements from a class Pin
John R. Shaw4-Oct-07 12:24
John R. Shaw4-Oct-07 12:24 

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.