Multiple Video Cards/Monitors

Started by
3 comments, last by lostrig 20 years ago
I am trying to work with a secondary/independent video card/monitor that is installed on my system. I can span both monitors with the desktop so I know the second card is installed but I would like to work with the second monitor independent of the primary monitor. When I use EnumDisplayDevices I see all of the Adapters that I expect to see. However when I try to do something like CreateDevice() as the Direct3D9 Example does I am not able to access this spare card. Since this is an independent card/device do I have to use a fullscreen mode or somthing of this nature. Any help on how I can access this second card would be really appericated.
Advertisement
Has anyone ever seen example code that initializes an independent monitor/adapter and then paints a window object on the independent monitor?

Is directX not the solution I need? Should I be looking at the GDI or somewhere else?
I''m not sure what problem you''re having. I code with multiple monitors all the time (normal SDK stuff, I haven''t tried with DX yet, I''m still new to this) .. If Windows recognizes the monitors, you should be able to use them.

There are a number of multi-mon related functions, for enumeration and detecting characteristics like location info. To create a window, just create it with coordinates that reflect the location of the monitor you''re interested in. THe primary monitor is always located at 0,0 (upper left corner). Additional monitors can be located anywhere relative to that.

Since DX wants a window, you should be able to create one on the monitor of your choice, then pass that handle when you set up DX. Search Microsoft''s site for a file called multimon.h ... it has a good list of all the multi-mon-related structures and functions. Hope this helps.
Too old for this ...
So everything has to be relative to the primary monitor? In my mind I was looking for controlling the second monitor with no regard to the primary monitor. Here is how I was thinking of it in my mind, please bear with the psudeocode.

while (EnumurateDisplayDevices (i = 0-2))
{
Initialize Adapter Card/Device i
Create full screen window to be displayed within device i
}

So what I want is like a whole seperate program that is not relative to the first monitor or adapter. Is this possible or have I just got the wrong idea? I understand that I can use the spanned desktop idea to control both monitors but I didn''t want that effect.

Thanks for any advice anyone can offer,
The followig came from the SDK and I think it answers my question everyone/anyone is welcome to help me interpert the following.


When using multiple monitors as independent displays, the desktop contains one display or set of displays. This set of displays always includes the primary monitor and behaves as mentioned in the other sections of this topic. An application can use any other monitor as an independent display.

The window manager knows nothing about the independent displays. They are completely controlled by the application, and no window manager functions are available to the application (all window manager calls automatically go to the primary display). Each independent display has its own origin and horizontal and vertical coordinates, and is accessed through the GDI functions such as CreateDC or the DirectX functions such as DirectDrawCreate.


So I feel this means that I can use the device but that I cannot create windows? However I get the feeling that this implies that I can use DirectX to create within this monitor but DirectX is usually tied to a window so I am not clear on how to get started. I have been able to enumerate my devices and see that they are there but how do I start moving towards rendering to this monitor? Can I use Directx within this monitor or is it only limited to the GDI functions?

This topic is closed to new replies.

Advertisement