Sign in to follow this  
MetaCipher

Win32 Focus Problem

Recommended Posts

MetaCipher    145
I have a simple program running in the tray. It notifies the user whenever new emails arrive (this works fine). The problem is that the dialog window that notifies the user won't pop up, but whenever I right click the tray icon and then click off the menu, it will pop up. It seems as if the program doesn't have focus, and isn't running, or something along those lines. Any help would be appreciated.

Share this post


Link to post
Share on other sites
MetaCipher    145
I think it's now showing the dialog window because the process doesn't have focus, so it's as if the process thread is suspended by Windows until it becomes active (gains focus). How can I get around this?

Share this post


Link to post
Share on other sites
Xelen    312
Hmm, what if you made another form that was a small pop-up or dialog, and that would show up but it had an "always on top" property enabled. Just stick it in the bottom right corner of the screen so as to be less intrusive, and also have them have a way to be able to close it quickly if it does get in there way.

Share this post


Link to post
Share on other sites
Xelen    312
Quote:
Original post by MetaCipher
I figured it out. I created a thread to run in the background separate from the window.


Oh you came up with a solution right as I was coming up with my idea haha.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this