No_Name a ?mis l'id?e suivante :
AliR (VC++ MVP) a expos? le 2/20/2009 :
Does the PreTranslateMessage of you dialog get called, if you click the
mouse somewhere in your dialog (other than on the combobox)?
If it doesn't then you have a bug somewhere.
I don't know about a Windows CE program, but if you set a breakpoint at
the beginning of PreTranslateMessage and try to debug you will get stuck
in an infinite loop of focus problems, and you will never be able to run
the program, the breakpoint will constantly hit!
AliR.
Thank you for your answer.
I made the test you suggested in the PreTranslate Message() function, and
I verified it is being called when I click on the Dialog. Apparently,
what I don't get are just the keystrokes from the terminal keyboard.
But if I do a selection in my Combo, I get all keyboard events, so it
suggests that my dialog does not get "the focus", and setting
myCombo->SetFocus() seems not to be enough for that ...
In fact, it seems that the Combo is the one that gets the message event.
But since the key I get is not managed in the PreTranslateMessage() of the
combo, and since the PreTranslateMessage(?) function of the Combo ends
with
return CComboBox::PreTranslateMessage(pMsg);
I thought the owner of the Combo dialog (ie the CDialog) was going to
receive the keyboard event ?
Should I call myself the PreTranslateMessage() of the CDialog, then ?
Thank you.