window don't get focus but receiving mouse input
-
Like On-Screen Keyboard,I want my app don't get focus but still receving mouse input. You can test On-screen keyboard in Windows XP,or 2k. Because I use SendInput function to act on Windows Media Player,I must activate it when i click button on my app.Otherwise,my program itself receive my commands.And it's not the result i expect. Please help me.I think much but i can't.
-
Like On-Screen Keyboard,I want my app don't get focus but still receving mouse input. You can test On-screen keyboard in Windows XP,or 2k. Because I use SendInput function to act on Windows Media Player,I must activate it when i click button on my app.Otherwise,my program itself receive my commands.And it's not the result i expect. Please help me.I think much but i can't.
In the Window Procedure, do the following:
case WM_NCACTIVATE: return DefWindowProc(hWnd, message, (WPARAM)0, lParam); case WM_CREATE: SetWindowPos(hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
Note: the first time the window is displayed, you would need to take away focus from it. after that, it should work as u need. HTH Bikram Singh -
Like On-Screen Keyboard,I want my app don't get focus but still receving mouse input. You can test On-screen keyboard in Windows XP,or 2k. Because I use SendInput function to act on Windows Media Player,I must activate it when i click button on my app.Otherwise,my program itself receive my commands.And it's not the result i expect. Please help me.I think much but i can't.
Also try using the
WS_EX_NOACTIVATE
extended style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- #include "witty-quote.h" -
Also try using the
WS_EX_NOACTIVATE
extended style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- #include "witty-quote.h"Thanks for the info! I tried to use it, but it does not seem to work. Also, when i try and drag the window around, its "jumpy" - like when your CPU utilization is very high and you're trying to move a window... Any idea about how to fix this problem? Bikram Singh