Device Context with 2 monitors.

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Device Context with 2 monitors.

Post by Natter »

Hi,

2 monitors are connected to the computer. I need to get the Device Context from one and from the other. How it can be done ?
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Device Context with 2 monitors.

Post by nageswaragunupudi »

We have only one hDC (device context) for both the monitors together.

Total area occupied by both the monitors on this hDC is

Code: Select all | Expand


WITH OBJECT FW_VirtualScreen()
   ? :nTop, :nLeft, :nBottom, :nRight, :nWidth, :nHeight
END
 


To find the Recangle of any monitor in the Virtual Screen space:

Code: Select all | Expand


WITH OBJECT  (oMonitor:= FW_GetMonitor( nthMonitor )
   ? :nTop, :nLeft, :nBottom, :nRight, :nWidth, :nHeight
END
 
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Device Context with 2 monitors.

Post by Natter »

Thank you, Mr.Rao !

Sorry I didn't understand - the FW_VirtualScreen() function returns an object of type TRect. How can I get DC from it ?
Post Reply