Jump to content
  • Advertisement
Sign in to follow this  
Haytil

Running Programs on Second Monitor from MSVC

This topic is 3274 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

Hello, I recently got a large second monitor, which I connect to my laptop and extend my desktop onto. I would like to run programs from within Microsoft Visual C++ 2005 Express edition on the second monitor - to take advantage of the large size and to test larger resolutions. However, when I run a program from within MSVC, it automatically defaults to the smaller, laptop monitor. You might think a workaround would be to drag my programs from the main monitor to the second - but aside from being a hassle each time I want to run the program and test something, it also makes it impossible to start full-screen applications with a larger resolution than my laptop monitor (negating any advantage of the larger, second monitor). Is there a way to configure MSVC to run in the second monitor when available? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
It's not MSVC that gets to choose which monitor your program starts on, it's your program. By default, when you call CreateWindow, if you use CW_USEDEFAULT for the x and y parameters, your window will open on the primary monitor.

It is common for programs, when they close, to "remember" their window position/size somehow (e.g. by saving it a file in %APPDIR% or putting it in the registry, etc). Then, when they start up again, they read that file back in and start at the same position again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!