Be notified of the input focus
-
Hi all, I have a dialog that have to do something when it gains the focus. The dialog is derived by CDialog and contains some controls. I tried w/ CWnd::OnKillFocus and CWnd::OnSetFocus but my overloaded funcs are never called. The func CWnd::OnLButtonDown works well but I also need to know when the dialog loses the input. Could you please help me? Thanx a lot. Best regards, Andrea :)
-
Hi all, I have a dialog that have to do something when it gains the focus. The dialog is derived by CDialog and contains some controls. I tried w/ CWnd::OnKillFocus and CWnd::OnSetFocus but my overloaded funcs are never called. The func CWnd::OnLButtonDown works well but I also need to know when the dialog loses the input. Could you please help me? Thanx a lot. Best regards, Andrea :)
De Nardis Andrea wrote: I have a dialog that have to do something when it gains the focus. Check out the
WM_ACTIVATE
and/orWM_ACTIVATEAPP
messages.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
De Nardis Andrea wrote: I have a dialog that have to do something when it gains the focus. Check out the
WM_ACTIVATE
and/orWM_ACTIVATEAPP
messages.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
Hi David, unfortunately it does not work. My dialog is a window inside a frame in a SDI application. I checked w/ Spy++ and it does not receive any WM_ACTIVATE msg. Have u got any idea? Sorry if I am annoying u w/ silly question. Thanx a lot. Bye, Andrea:)