Jump to content
  • Advertisement
Sign in to follow this  
pieslice

[C++ WinAPI] How to start a program in secondary display device

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

How can a program become started in secondary display device, e.g in a TV or just plain secondary monitor. Is this possible in plain WinAPI or does it need DirectX or similar?

Share this post


Link to post
Share on other sites
Advertisement
The only method I found was to create the window and then move it to a location on the secondary screen before showing it.

To do this you need to enumerate the display devices and get their 'virtual coordinates' so that you know where to move the window to.

For example on my setup the virtual coordinates for my primary monitor would be (0,0) with a width of 1920 and height of 1200. My secondard monitor however, as it is to the left of my primary has the virtual coordinates of (-1920,0) and the same width and height.

Share this post


Link to post
Share on other sites
I assume that if I set the window as fullscreen after moving it to the secondary monitor it will be fullscreen in the secondary monitor?

Actually I've manually done the gimmick you explained and it seemed to work.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!