A window never get focus?
-
How can I make my app not get focus like On-Screen keyboard in XP. I try to use WM_MOUSEACTIVATE with return value MA_NOACTIVATE but I can't.When I click button in my dialog,it activates.So i can't send key events to other applications(I use SendInput). Please help me.
-
How can I make my app not get focus like On-Screen keyboard in XP. I try to use WM_MOUSEACTIVATE with return value MA_NOACTIVATE but I can't.When I click button in my dialog,it activates.So i can't send key events to other applications(I use SendInput). Please help me.
Information not enough for a good answer. 1. Use EnableWindow(hwnd,FALSE) to disable any mouse or kbd input to the window. This is the only suggestion as of now... Bikram Singh
-
How can I make my app not get focus like On-Screen keyboard in XP. I try to use WM_MOUSEACTIVATE with return value MA_NOACTIVATE but I can't.When I click button in my dialog,it activates.So i can't send key events to other applications(I use SendInput). Please help me.
if you want the focus to bet set at the creation of your dialog, call
Cwnd::SetFocus()
intoOnInitDialog()
and make this function return**TRUE**
. if you just need to set the focus on a control when doing someting into the dialog, just call SetFocus().
TOXCCT >>> GEII power
-
if you want the focus to bet set at the creation of your dialog, call
Cwnd::SetFocus()
intoOnInitDialog()
and make this function return**TRUE**
. if you just need to set the focus on a control when doing someting into the dialog, just call SetFocus().
TOXCCT >>> GEII power
I think that you must call SetFocus in WM_SETFOCUS and pass its lparam to SetFocus! Is that right?:confused:
-
I think that you must call SetFocus in WM_SETFOCUS and pass its lparam to SetFocus! Is that right?:confused:
-
:~ WM_SETFOCUS is a message, not a function. moreover, you can call SetFocus() anywhere (in a handler you created for example)
TOXCCT >>> GEII power
It is right, WM_SETFOCUS is a message. When a window receive this message, it can reject its focus by calling SetFocus!