xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

WInfo()

Returns all coordinates of the current window.

Syntax

WInfo() --> aWindowInfo

Return

The function returns an array of eight elements holding the screen coordinates of the unformatted and formatted display area of a window.

Array holding window coordinates
ElementDescription
Unformatted window
1Top row coordinate equivalent to WRow()
2Left column coordinate equivalent to WCol()
3Bottom row coordinate equivalent to WLastRow()
4Right column coordinate equivalent to WLastCol()
Formatted display area
5Top row coordinate equivalent to WfRow()
6Left column coordinate equivalent to WfCol()
7Bottom row coordinate equivalent to WfLastRow()
8Right column coordinate equivalent to WfLastCol()

Info

See also:WCol(), WLastCol(), WLastRow(), WOpen(), WRow(), WSelect()
Category: CT:Window , Windows (text mode) , xHarbour extensions
Source:ct\ctwin.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example creates a window with a frame (fromatted window)
// and displays the contents of the WInfo() array.

   PROCEDURE Main
      LOCAL nT := 4, nL := 6, nW := 50, nH := 20

      SET COLOR TO N/W
      CLS

      WOpen( nT, nL, nT+nH, nL+nW, .T. )
      WBox()

      aInfo := WInfo()

      FOR i:=1 TO Len( aInfo )
         ? "aInfo[" + Str(i,1) + "] :=", Str(aInfo[i],2)
      NEXT
      ** result:
      // aInfo[1] :=  4
      // aInfo[2] :=  6
      // aInfo[3] := 24
      // aInfo[4] := 56
      // aInfo[5] :=  5
      // aInfo[6] :=  7
      // aInfo[7] := 23
      // aInfo[8] := 55

      Inkey(0)

      WClose()
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe