Back to main

 

Function 0 - define and draw a window

 

Defines the application window. Draws a window frame, a working title and area. For Windows with skin, defines standard close buttons and minimizations.

Characteristic:

  * eax = 0-function number

  * ebx = [coordinate on axis X]*65536 + [size on axis X]

  * ECx = [coordinate on axis y]*65536 + [size on axis g]

  * edx = 0xxyrrggbb, where:

    * Y = window style:

      * G=1 only to define the scope window, nothing to draw

      * Y=3 - window with skin

      * Y=4 - window with skin of fixed sizes

      * G=0.2 these styles are obsolete and should not be used more than, they are left for compatibility with older applications

      * other possible values (5 to 15) are reserved, calling a function with such Y is ignored

    * RR, GG, BB = red, green, blue, respectively components of the window workspace color (ignored for style y=1)

    * X = DCBA (bits)

      * A = 1-the window has a title

      * B = 1-coordinates of all graphic primitives are set relative to the client area of the window

      * C = 1-do not paint the workspace when drawing a window

      * D = 0 - normal working area fill, 1-gradient fill

    The following options are for Windows of type I and type II and ignored for styles y=1,3:

  * esi = 0xXYRRGGBB-header color

    * RR, GG, BB define the color itself

    * R=0-normal window and y=1-non-movable window (works for all window styles)

    * X defines a gradient of header: X=0 - there is no gradient, X=8 - normal gradient, for Windows of type II x=4 - negative gradient

    * other values of x and G are reserved

  * EDI = address of header line for styles y=3,4 (see also function 71.1)

Returned value:

  * function does not return a value

Comments:

  * The position and sizes of Windows installed on the first call this function is ignored in subsequent; to change use the position and / or size of an already created window 67th function.

  * For Windows styles y=3,4 caption with (A=1) header line set when this function is first called and ignored when subsequent (more precisely, ignored after the call sub-function 2 function 12 - end of redraw); to change the title bar of an already created window, use the subfunction 1 of function 71.

  * If you use the appropriate window styles, the position and / or the window size can be changed by the user. The current position and dimensions can be obtained by calling function 9.

  * The window should fit on the screen. If coordinates provided and the dimensions do not satisfy this condition, then the corresponding the coordinate (or possibly both) is considered zero, and if it is does not help, then the appropriate size (or maybe both) in the size of the screen. XPOS denote Next,Ypos,xsize,ysize - values passed ebx, ecx. The coordinates relative to the upper left Are given the angle of the window, which is thus defined as (0,0), the coordinates the essence of the lower right corner (xsize,ysize).

  * Window dimensions are understood in terms of the coordinates of the lower right corner. The same applies to all other functions. This means that the actual dimensions are 1 pixel larger.

  * View window style g=1:

    * fully defined by the application

  * View window with skin R=3,4:

    * draw external frame of width 1 pixel external colour " of the skin

    * draw intermediate frame of width 3 pixel frame color " of the skin

    * draw internal frame of width 1 pixel inner color " of the skin

    * the title is drawn (by the pictures from the skin) in the rectangle (0,0)- (xsize, _skinh-1)

    * if ysize>=26, the working area of the window is colored - a rectangle with upper-left corner (5,_skinh) and the bottom right (xsize-5, ysize-5) - the color specified in the edx register (taking into account the gradient)

    * define two standard buttons: close and minimize (see function 8)

    * if A=1 and in EDI (non-zero) a pointer to the title bar, in that it is displayed in the title of the place determined by the skin

    * The value of the _skinh variable is available as a result of a call sub-functions 4 functions 48

 

Registers for Constant :

  eax - SF_CREATE_WINDOW (0)