Window library WindCreate() WindClose()
Programming guideline of WinDom

WindOpen()

NAME

WindOpen - Open a window.

PROTOTYPAGE

int WindOpen( WINDOW *win, int x, int y , int w, int h);

PARAMETERS

win:
address of window descriptor,

x,y,w,h:
position and size of the window.

return:
a non nul value if error.

DESCRIPTION

WindOpen() opens a window on screen and replaces the AES open_wind() function. In WinDom environnement, the open_wind() should never be used (except some very special case).

An opened window has its status WS_OPEN bit set to 1 (i.e. the status field of the WINDOW structure). If the status WS_GROW bit is set to 1, a graphic effect should be used (via graf_growbox() function).

It is possible to give to the x and y parameter a -1 value. In this case, the window will be horizontally centered (x=-1) or vertically centered (y=-1) or both. WindOpe() calls GrectCenter() to performe that.

A window can have minimum and maximal size : just sets the min_w, min_h, max_w, max_h fields of the window descriptor.

IMPORTANT

If a window has to be opened with open_wind() (for a special raison), the window should be registered in the internal WinDow list of opened windows with the add_windowlist() function. It is important for WinDom to have a correct list because the WM_BOTTOMED message is simuled with old TOS version.

SEE ALSO

WindCreate(), WindClose(), WindDelete(), WindClear(), WindSet(), WindGet(), GrectCenter(). add_windowlist().