Discussion:
bringing application to the front
(too old to reply)
Z.K.
2006-06-29 21:30:13 UTC
Permalink
I have an application that I detect the instance of, but I can't figure out
how to give the application that is already active focus when trying to
create a second instance of the running application. How would I do this?

Z.K.
Z.K.
2006-06-29 21:44:45 UTC
Permalink
Nevermind, I figure it out. I used the command:
m_pMainWnd->SetForegroundWindow();



Z.K.
Post by Z.K.
I have an application that I detect the instance of, but I can't figure out
how to give the application that is already active focus when trying to
create a second instance of the running application. How would I do this?
Z.K.
Tom Serface
2006-06-30 15:04:04 UTC
Permalink
The BringWindowToTop() function would work for you as well:

http://msdn2.microsoft.com/en-us/library/22yka1a4.aspx

Tom
Post by Z.K.
m_pMainWnd->SetForegroundWindow();
Z.K.
Post by Z.K.
I have an application that I detect the instance of, but I can't figure
out
Post by Z.K.
how to give the application that is already active focus when trying to
create a second instance of the running application. How would I do this?
Z.K.
Loading...