Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want my application can show something in the second monitor. I can not let the monitor work in the mode of large desktops. How can i do that.

I know that in MSDN

Windows GDI
Multiple Display Monitors
About Multiple Display Monitors
Using Multiple Monitors as Independent Displays

There is something that i can use. But it does not work!

I want to know how it can work.

thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 6-Jul-14 12:15pm    
This is off-topic, not related to C programming. This is the question at the level of the Windows user. Please refer to the Windows documentation.
—SA

Check the documentation[^]. And please do not just say "it does not work", as that gives us no idea what your code is doing, or what results you see.
 
Share this answer
 
I thought the MSDN article you mentioned was clear.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd145179%28v=vs.85%29.aspx[^]

When your program starts, it is associated with a Windows desktop. Any monitors not associated with that desktop won't be accessible. You say " can not let the monitor work in the mode of large desktops.". I take that to mean you don't want the monitor added to the default desktop.

Solution: create a separate desktop for your independent monitor.

You can create multiple desktops and flip between them.

If the other monitor is already attached to a different desktop, your program will need to attach to it before attempting to create a window under that desktop's window space.

The monitor may be in the current Window station or not. See ...

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682614%28v=vs.85%29.aspx[^]

... and also ...

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682644%28v=vs.85%29.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900