FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to read position and size of a dialog box (solved)
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
How to read position and size of a dialog box (solved)
Posted: Sat Oct 19, 2019 11:44 AM

Hello,

How can I read the position and the size of a dilalog box in my application?

Thx.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to read position and size of a dialog box
Posted: Sat Oct 19, 2019 12:38 PM
Michel ,

:nTop
:nLeft
:nBottom
:nRight


regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: How to read position and size of a dialog box
Posted: Sat Oct 19, 2019 12:44 PM

From a post of Uwe :

aRect := GetWndRect(oWnd)
oBar := TExplorerBar():New( 0, aRect4 - 300, aRect4 + 720, aRect3 - 75, oWnd )

Mayby also on oDlg

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to read position and size of a dialog box
Posted: Sat Oct 19, 2019 03:21 PM
How can I read the position and the size of a dilalog box in my application?


To get the dialog position from screen-top and left and the dialogsize

oRect := oDlg:GetRect()

nTop := oRect:nTop
nLeft := oRect:nLeft

nWidth := oDlg:nWidth
nHeight := oDlg:nHeight

// ----------------

Resizing a dialog You need as well :

nBottom := oRect:nBottom
nRight := oRect:nRight

// restore the dialog to a saved position
oDlg:Move( nTop, nLeft, nRight - nLeft, nBottom - nTop )

Window :

aRect := GetWndRect( oWnd:hWnd )
nTop := aRect[ 1 ]
nLeft := aRect[ 2 ]
nBottom := aRect[ 3 ]
nRight := aRect[ 4 ]

nHeight := aRect[ 3 ] - aRect[ 1 ] + 1
nWidth := aRect[ 4 ] - aRect[ 2 ] + 1

regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: How to read position and size of a dialog box
Posted: Sat Oct 19, 2019 11:18 PM

Hello everybody,

Thank you all very much for your help.

Testing will start tomorrow.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: How to read position and size of a dialog box
Posted: Sun Oct 20, 2019 07:06 PM

Hello, everyone.

I did some tests and everything is working just fine.

Thank you all so much for your help.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion