Click here to Skip to main content
15,889,992 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Mark Salsbery13-Sep-08 9:40
Mark Salsbery13-Sep-08 9:40 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Joseph Marzbani13-Sep-08 9:51
Joseph Marzbani13-Sep-08 9:51 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Perspx13-Sep-08 9:59
Perspx13-Sep-08 9:59 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Joseph Marzbani13-Sep-08 10:06
Joseph Marzbani13-Sep-08 10:06 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Mark Salsbery13-Sep-08 10:17
Mark Salsbery13-Sep-08 10:17 
AnswerRe: Why the hell does the TranslateMessage() fail? Pin
Joseph Marzbani13-Sep-08 22:08
Joseph Marzbani13-Sep-08 22:08 
QuestionRe: Why the hell does the TranslateMessage() fail? Pin
CPallini13-Sep-08 22:54
mveCPallini13-Sep-08 22:54 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Mark Salsbery14-Sep-08 9:27
Mark Salsbery14-Sep-08 9:27 
Jusef Marzbany wrote:
1- where's WM_KEYUP?


You stated:
"I recieved WM_KEYUP as well as WM_KEYDOWN in my
message loop and I'm sure about that ..."


So you weren't actually getting both the messages before?


As cPallini mentioned, you'll need to debug this.

You're trying to force messages that are system messages.
Unless you do it the exact way the system does, it's not
going to work. That's why I said it's problematic.
TranslateMessage could be failing because you're not emulating the
system messages properly.

Keyboard input was never meant for multiple targets on Windows.
Only the one window with keyboard focus should get the key messages.

You may want to try posting messages to a window instead of
a thread.

Tip: Don't use MessageBox in the message loop!

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Joseph Marzbani15-Sep-08 4:18
Joseph Marzbani15-Sep-08 4:18 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Perspx13-Sep-08 9:32
Perspx13-Sep-08 9:32 
AnswerRe: Why the hell does the TranslateMessage() fail? Pin
Joseph Marzbani13-Sep-08 9:45
Joseph Marzbani13-Sep-08 9:45 
GeneralRe: Why the hell does the TranslateMessage() fail? Pin
Perspx13-Sep-08 9:48
Perspx13-Sep-08 9:48 
QuestionGetRawInputDeviceInfo' : undeclared identifier [modified] Pin
hariakuthota13-Sep-08 6:58
hariakuthota13-Sep-08 6:58 
QuestionWM_INPUT' : undeclared identifier Pin
hariakuthota13-Sep-08 5:48
hariakuthota13-Sep-08 5:48 
AnswerRe: WM_INPUT' : undeclared identifier Pin
bob1697213-Sep-08 6:14
bob1697213-Sep-08 6:14 
GeneralRe: WM_INPUT' : undeclared identifier Pin
hariakuthota13-Sep-08 20:14
hariakuthota13-Sep-08 20:14 
GeneralRe: WM_INPUT' : undeclared identifier Pin
bob1697214-Sep-08 8:03
bob1697214-Sep-08 8:03 
AnswerRe: WM_INPUT' : undeclared identifier Pin
Hamid_RT13-Sep-08 21:42
Hamid_RT13-Sep-08 21:42 
QuestionNot able to see the WM_IMPUT in class wizard. Pin
hariakuthota13-Sep-08 5:36
hariakuthota13-Sep-08 5:36 
AnswerRe: Not able to see the WM_IMPUT in class wizard. Pin
bob1697213-Sep-08 6:15
bob1697213-Sep-08 6:15 
GeneralRe: Not able to see the WM_IMPUT in class wizard. Pin
hariakuthota13-Sep-08 6:35
hariakuthota13-Sep-08 6:35 
GeneralRe: Not able to see the WM_IMPUT in class wizard. Pin
bob1697214-Sep-08 7:51
bob1697214-Sep-08 7:51 
QuestionHow can i name of the external device connected to the system. Pin
hariakuthota13-Sep-08 5:34
hariakuthota13-Sep-08 5:34 
QuestionMouse XY coordinates are changing slightly when Left MouseButton is pressed Pin
sdancer7513-Sep-08 5:26
sdancer7513-Sep-08 5:26 
AnswerRe: Mouse XY coordinates are changing slightly when Left MouseButton is pressed Pin
Mark Salsbery13-Sep-08 8:42
Mark Salsbery13-Sep-08 8:42 

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.