0

I'm not a newbie, but my programming for Windows is weak. I have multiple programs running on a PC. One is an operator interface, so it usually always has focus.

If an error/warning condition happens on the other programs, I use AfxMessageBox() to generate a popup window for the operator. That's fine is the program generating the popup has focus. My issue is the popup is hidden behind the program with focus.

I'm currently searching the Internet for past cases to point me in a direction, so I've not tried any code changes yet.

Is there a method to make the popup appear over the program with focus so the operator can acknowledge it. The operator can then decide if they need bring up the other program or not.

3

1 Answer 1

1

Right before popping up the message box, you can explicitly bring the application that pops up the messagebox to the foreground. You can probably do this by activating the main window of that application.

However, I would advise against that, because nobody likes random applications popping up in front of them while working on something else. Instead, look at how you can pop up a notification bubble in the system tray. That's the proper way of doing something like that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.