FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Device Context with 2 monitors.
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Device Context with 2 monitors.
Posted: 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 ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Device Context with 2 monitors.
Posted: 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 (fw): Select all Collapse
WITH OBJECT FW_VirtualScreen()
   ? :nTop, :nLeft, :nBottom, :nRight, :nWidth, :nHeight
END


To find the Recangle of any monitor in the Virtual Screen space:
Code (fw): Select all Collapse
WITH OBJECT  (oMonitor:= FW_GetMonitor( nthMonitor )
   ? :nTop, :nLeft, :nBottom, :nRight, :nWidth, :nHeight
END
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Device Context with 2 monitors.
Posted: Fri Dec 10, 2021 04: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 ?

Continue the discussion