Function 0 - define and draw the window.
Defines an application window. Draws a frame of the window, header and
working area. For skinned windows defines standard close and minimize
buttons.
Parameters:
- eax = 0 - function number
- ebx = [coordinate on axis x]*65536 + [size on axis x]
- ecx = [coordinate on axis y]*65536 + [size on axis y]
- edx = 0xXYRRGGBB, where:
- Y = style of the window:
- Y=0 - type I - fixed-size window
- Y=1 - only define window area, draw nothing
- Y=2 - type II - variable-size window
- Y=3 - skinned window
- other possible values (from 4 up to 15) are reserved,
function call with such Y is ignored
- RR, GG, BB = accordingly red, green, blue components of a color
of the working area of the window (are ignored for style Y=2)
- X = DCBA (bits)
- A = 1 - window has caption; for style Y=3 caption string
must be passed in edi, for other styles use
subfunction 1 of function 71
- B = 1 - coordinates of all graphics primitives are relative to
window client area
- C = 1 - don't fill working area on window draw
- D = 0 - normal filling of the working area, 1 - gradient
The following parameters are intended for windows
of a type I and II, and ignored for styles Y=1,3:
- esi = 0xXYRRGGBB - color of the header
- RR, GG, BB define color
- Y=0 - usual window, Y=1 - unmovable window
- X defines a gradient of header: X=0 - no gradient,
X=8 - usual gradient,
for windows of a type II X=4 - negative gradient
- other values of X and Y are reserved
- edi = 0x00RRGGBB - color of the frame
Returned value:
- function does not return value
Remarks:
- Position and sizes of the window are installed by the first
call of this function and are ignored at subsequent; to change
position and/or sizes of already created window use function 67.
- For windows with style Y=3 and caption (A=1) caption string is set
by the first call of this function and is ignored at subsequent
(strictly speaking, is ignored after a call to subfunction 2
of function 12 - end redraw); to change caption of already created
window use subfunction 1 of function 71.
- If the window has appropriate styles, position and/or sizes can be
changed by user. Current position and sizes can be obtained
by function 9.
- The window must fit on the screen. If the transferred
coordinates and sizes do not satisfy to this condition,
appropriate coordinate (or, probably, both) is considered as zero,
and if it does not help too, the appropriate size
(or, probably, both) is installed in a size of the screen.
Further let us designate xpos,ypos,xsize,ysize - values passed
in ebx,ecx. The coordinates are resulted concerning
the left upper corner of the window, which, thus, is set as (0,0),
coordinates of the right lower corner essence (xsize,ysize).
- The sizes of the window are understood in sence of coordinates
of the right lower corner. This concerns all other functions too.
It means, that the real sizes are on 1 pixel more.
- The window of type I looks as follows:
- draw external frame of color indicated in edi, 1 pixel in width
- draw header - rectangle with the left upper corner (1,1) and
right lower (xsize-1,min(25,ysize)) color indicated in esi
(taking a gradient into account)
- if ysize>=26, fill the working area of the window -
rectangle with the left upper corner (1,21) and right lower
(xsize-1,ysize-1) (sizes (xsize-1)*(ysize-21)) with color
indicated in edx (taking a gradient into account)
- if A=1 and caption has been already set by subfunction 1
of function 71, it is drawn in the corresponding place of header
- The window of style Y=1 looks as follows:
- completely defined by the application
- The window of type II looks as follows:
- draw external frame of width 1 pixel with the "shaded" color
edi (all components of the color decrease twice)
- draw intermediate frame of width 3 pixels with color edi
- draw internal frame of width 1 pixel with the "shaded" color edi
- draw header - rectangle with the left upper corner (4,4)
and right lower (xsize-4,min(20,ysize)) color, indicated in esi
(taking a gradient into account)
- if ysize>=26, fill the working area of the window -
rectangle with the left upper corner (5,20) and right lower
(xsize-5,ysize-5) with color indicated in edx
(taking a gradient into account)
- if A=1 and caption has been already set by subfunction 1
of function 71, it is drawn in the corresponding place of header
- The skinned window looks as follows:
- draw external frame of width 1 pixel
with color 'outer' from the skin
- draw intermediate frame of width 3 pixel
with color 'frame' from the skin
- draw internal frame of width 1 pixel
with color 'inner' from the skin
- draw header (on bitmaps from the skin) in a rectangle
(0,0) - (xsize,_skinh-1)
- if ysize>=26, fill the working area of the window -
rectangle with the left upper corner (5,_skinh) and right lower
(xsize-5,ysize-5) with color indicated in edx
(taking a gradient into account)
- define two standard buttons: close and minimize
(see function 8)
- if A=1 and edi contains (nonzero) pointer to caption string,
it is drawn in place in header defined in the skin
- value _skinh is accessible as the result of call
subfunction 4 of function 48