By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,573 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,573 IT Pros & Developers. It's quick & easy.

Preventing my app from getting the focus

P: n/a

I am writing an On-screen keyboard, similar to the one included in
windows 2k and XP.

The problem I am having is that I need my keyboard to never get the
focus, but still be able to process events such as mouse clicks.

I have tried setting focus back to the app that just lost the focus,
however in smoe application this does not work as the caret/cursor is
not returned to its original position. Therefore, I need to stop the
app that I'm writing to eg. IE or notepad, from ever losing the focus,
or rather, stop my app from activating/getting the focus.

I have tried various API's using various flags, but to no avail.

The closest I got was by using the SetWindowLong API with the
WS_EX_NOACTIVATE flag, which does stop my app from ever getting focus,
but it also makes it transparent and unable to receive any mouse

I have been struggling with this for a couple of weeks now, so any
help would be greatly appreciated.


Dave :o)
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.