xHarbour Reference Documentation > Function Reference |
Draws a frame around the current window.
WBox( [<cBoxChars>|<nBoxType>] ) --> nWindowID
Pre-defined box strings for WBox()
Constant | Description |
---|---|
B_SINGLE | Single-line box |
B_DOUBLE | Double-line box |
B_SINGLE_DOUBLE | Single-line top, double-line sides |
B_DOUBLE_SINGLE | Double-line top, single-line sides |
The function returns the window ID of the window where the frame is drawn, or -1 if the window is too small for drawing a frame.
See also: | SetClearB(), WOpen(), WSelect(), WFormat() |
Category: | CT:Window , Windows (text mode) |
Header: | Box.ch |
Source: | ct\ctwin.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays all 16 predefined frame types. To see the // difference between windows (not) clearing the screen, the // entire screen is filled with dots using DispBox(). PROCEDURE Main LOCAL nT := 2, nL := 2, nH := 10, nW := 6 LOCAL i SET COLOR TO W+/B CLS Dispbox( 0, 0, MaxRow(), MaxCol(), "........." ) FOR i:=0 TO 15 IF i == 8 nT += 15 nL := 2 ENDIF nWin := WOpen( nT, nL, nT+nH, nL+nW ) WSelect( nWin ) SET COLOR TO W+/B WBox( i ) SET COLOR TO GR+/B SayDown( "WBox " + Str(i,2), 0, 1, 2 ) nL += nW+2 NEXT RETURN
http://www.xHarbour.com