Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - method new class twindow constructor of window class http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
METHOD New CLASS TWindow   Constructor of window class
--------------------------------------------------------------------------------
Syntax:
     TWindow():New( nTop, nLeft, nBottom, nRight, cTitle, nStyle, oMenu,;  
          oBrush, oIcon, oWnd, lVScroll, lHScroll, nClrFore, nClrBack,;    
          oCursor, cBorder, lSysMenu, lCaption, lMin, lMax ) --> oTWindow  

Parameters:

nTop    --
          --  These two determine the top left corner of the window
nLeft   --

nBottom --
          --  The right bottom corner of the window.
nRight  --

cTitle        The title of the window.

nStyle:       Determines the characteristics of the window. These
              characteristics are define by the following constants
              (defined in WINAPI.CH):

        Constant            Purpose

        WS_BORDER           Window has a border.

        WS_CAPTION          Window has a title bar (implies the
                            WS_BORDER style). This style cannot be
                            used with the WS_DLGFRAME style.

        WS_CHILD            A child window.  Cannot be used with
                            the WS_POPUP style.

        WS_CHILDWINDOW      Same as the WS_CHILD style.

        WS_CLIPCHILDREN     Excludes the area occupied by child
                            windows when drawing within the parent
                            window.  Used when creating the parent
                            window.

        WS_CLIPSIBLINGS     Clips child windows relative to each other;
                            that is, when a particular child window
                            receives a paint message, the
                            WS_CLIPSIBLINGS style clips all other
                            overlapped child windows out of the
                            region of the child window to be
                            updated. (If WS_CLIPSIBLINGS is not
                            specified and child windows overlap, it
                            is possible, when drawing within the
                            client area of a child window, to draw
                            within the client area of a neighboring
                            child window.) For use with the
                            WS_CHILD style only.

        WS_DISABLED         Window will be initially disabled.

        WS_DLGFRAME         Defines a window with a double border
                            but no title.

        WS_GROUP            Specifies the first control of a group of
                            controls in which the user can move from
                            one control to the next by using the arrow
                            keys. All controls defined with the
                            WS_GROUP style after the first control
                            belong to the same group. The next control
                            with the WS_GROUP style ends the style
                            group and starts the next group (that is,
                            one group ends where the next begins).
                            Only dialog boxes use this style.

        WS_HSCROLL          Window has a horizontal scroll bar.

        WS_MAXIMIZE         Window should be of maximum size.

        WS_MAXIMIZEBOX      Creates a window that has a Maximize button.

        WS_MINIMIZE         Define window that is initially
                            minimized. For use with the
                            WS_OVERLAPPED style only.

        WS_MINIMIZEBOX      Creates a window that has a Minimize button.

        WS_OVERLAPPED       Defines an overlapped window. An
                            overlapped window has a title and a
                            border.

        WS_OVERLAPPEDWINDOW Creates an overlapped window having the
                            WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU,
                            WS_THICKFRAME, WS_MINIMIZEBOX, and
                            WS_MAXIMIZEBOX styles.

        WS_POPUP            Creates a pop-up window. Cannot be used
                            with the WS_CHILD style.

        WS_POPUPWINDOW      Creates a pop-up window that has the
                            WS_BORDER, WS_POPUP, and WS_SYSMENU
                            styles.  The WS_CAPTION style must be
                            combined with the WS_POPUPWINDOW style
                            to make the System menu visible.

        WS_SYSMENU          Creates a window that has a System-menu
                            box in its title bar. Used only for
                            windows with title bars.

        WS_TABSTOP          Specifies one of any number of controls
                            through which the user can move by
                            using the TAB key. The TAB key moves
                            the user to the next control specified
                            by the WS_TABSTOP style. Only dialog
                            boxes use this style.

        WS_THICKFRAME       Creates a window with a thick frame
                            that can be used to size the window.

        WS_VISIBLE          Creates a window that is initially
                            visible. This applies to overlapped,
                            child, and pop-up windows.  For
                            overlapped windows, the y parameter is
                            used as a ShowWindow function
                            parameter.

        WS_VSCROLL          Creates a window that has a vertical
                            scroll bar.

              Note: If this parameter is used it will override the
              values of the following parameters:

              cBorder
              lCaption
              lSysmenu
              lmin
              lMax
              lVScroll
              lHScroll

oMenu         Menu for Window. This parameter should pass on a TMenu
              object.

oBrush        The brush used to paint the client area of the window. It
              is stored in the instance variable::oBrush. If none is
              passed, it will be created by the method SetColor().

oIcon         The icon that will be used whenever this window is
              minimized.  If none is passed the icon is extracted from
              USER.EXE (which means you get a small MS-WIndows emblem
              as icon).

oWnd          The TWindow object of which this window is the child
              window. If this parameter is not passed it means that
              this window will stand on its own.

lVScroll      Determines whether the window will have a vertical
              scrollbar. The default value is .F.

lHScroll      Determines whether the window will have a horizontal
              scrollbar. The default value is .F.

nClrFore      The foreground color (the color that is used to draw on
              the window). This can either be a MS-Windows COLOR number or a
              CA-CLipper color string (ie "R/G") in which case the
              nClrBack parameter will be ignored.

nClrBack      The background color of the window. This has to be a
              MS-Windows COLOR number.

oCursor       Determines which cursor will be shown when the mouse moves of
              the surface of this window.

cBorder       This parameter controls the type of border that the window
              has. It can be one of the following character strings:

              NONE     The window will be a popup window
              SINGLE   (Default) The window will have a thick frame

lSysMenu      Create window with a System Menu button on the top/left
              corner of the window. The system menu will only be shown if
              the window has a title bar (see lCaption)

lCaption      Determine if the window will have a title bar. Default is
              .T.

lMin          Determine whether or not the window will have a Minimize
              box. This box will only be shown if the window has a
              title bar (see lCaption)

lMax          Determines whether there will be a Maximize box for this
              window. This box will only be shown if the window has a
              title bar (see lCaption)


Purpose:      The New() Method creates a TWindow object and initializes
              a number of instance variables of the TWindow object.

              Note: Do not use the parameters indiscriminately because
              several parameters have effect upon each other. For
              example the behaviour determined by the lMin and the lMax
              parameters will have NO effect if the nStyle parameter is
              passed.


Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson