HI,
I have a MFC dialog which is a parent window. This dialog contains several child windows which are dialogs themseleves having other child controls like button, edit box etc. My problem is that I need to change the default behaviour of the Enter key such that, no matter which child dialog is active and no matter which child control within the child dialog has the focus, on press of the Enter key (VK_RETURN
), the parent window must be notified where I can handle it as I want.
PreTranslateMessage()
fails for this scenario when the focus is on child control. What is the best way to tackle this problem? Would using ProcessMessageFilter()
hit the performance?
Can any of you guide me on this? Sample code would be really helpful.
Thanks all...