Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

spacemonkey005

mult. window instances

This topic is 5140 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I searched around here thinking that I could find the answer, but with no luck. I am working on a game in C++/DirectX 8 and I want to limit the user to only have 1 instance of the game open at a time. The only examples I have been able to find are for MFC Apps.... Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites
Advertisement
The most commonly used method is to use CreateMutex() to create and attempt to acquire a named mutex. If the attempt to acquire fails then there''s another instance of the application running.

An example of how to do this is available on MSDN.

Share this post


Link to post
Share on other sites
Thanks a bundle - exactly what I was hunting for. Minus one thing. Now after the .exe has been clicked again, how to make the current instance of it come to the front of the screen so users won''t get all confused! heh

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!