views:

47

answers:

1

Creating a new Managed DirectX device on a single monitor setup is easy, I call the device constructor with adapter identifier 0 ( or Manager.Adapters.Default.Adapter).

On a multiple monitor setup I want to create the device with the correct adapter identifier 0 or 1, depending on the primary or secondary monitor being currently used. How can I determine which adapter id I should use?

+1  A: 

Couldn't figure out how to do this with Managed DirectX, wrote a wrapper for MonitorFromWindow and MonitorFromPoint to do it.

spaceman