Device Context with 2 monitors.

Device Context with 2 monitors.

Postby Natter » Thu Dec 02, 2021 11:31 am

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 ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Device Context with 2 monitors.

Postby nageswaragunupudi » Fri Dec 10, 2021 11:45 am

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 view

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 view

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10619
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Device Context with 2 monitors.

Postby Natter » Fri Dec 10, 2021 4:11 pm

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 ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests