Page 1 of 1

Device Context with 2 monitors.

Posted: Thu Dec 02, 2021 11:31 am
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 ?

Re: Device Context with 2 monitors.

Posted: Fri Dec 10, 2021 11:45 am
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
 

Re: Device Context with 2 monitors.

Posted: Fri Dec 10, 2021 4:11 pm
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 ?