WINDOW Mnemonic - Create a SYSGUI Window
Syntax
'WINDOW'(x,y,w,h,title,flags{,eventmask})
Description
For BBj-specific information, see the WINDOW Mnemonic - Create SYSGUI Window BBj.
The 'WINDOW' mnemonic creates a SYSGUI window.
|
Parameter |
Description |
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
x |
Horizontal position of the upper-left corner of the window in current units. |
|||||||||||||||||||||||||||||||||||||||||||||
|
y |
Vertical position of the upper-left corner of the window in current units. This value does not take into account the space taken by menus or title bars. If a window is defined with a menu and a title bar and its y parameter is set to zero, the menu and title bar will not be visible when a VPRO/5 program displays the window. The y parameter should be adjusted by 20 pixels to account for a menu and 20 pixels for a title bar. For example, if a window has a menu and a title bar and the y parameter is set to 60, the top of the title bar will appear 20 pixels from the top of the screen when a VPRO/5 program displays the window. |
|||||||||||||||||||||||||||||||||||||||||||||
|
w |
Width of the window in current units. |
|||||||||||||||||||||||||||||||||||||||||||||
|
h |
Height of the window in current units. |
|||||||||||||||||||||||||||||||||||||||||||||
|
title |
Window title. This is the initial title and can be changed at any time with the 'TITLE' mnemonic. |
|||||||||||||||||||||||||||||||||||||||||||||
|
flags |
|
|||||||||||||||||||||||||||||||||||||||||||||
|
eventmask |
Event masks to be applied to the window:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
Event |
Code |
|---|---|
|
A |
|
|
B |
|
|
c |
|
|
f |
|
|
e |
|
|
t |
|
|
l (lower case L) |
|
|
C |
|
|
E |
|
|
w |
|
|
d |
|
|
u |
|
|
2 |
|
|
m |
|
|
N |
|
|
R |
|
|
p |
|
|
s |
|
|
b |
|
|
X |
|
|
F |
|
|
S |
The x,y,w,h bounding rectangle of a window describes the location of the inside (the usable drawing area or client area) of the window. Note that if a window is placed at (0,0), the title bar will not be visible.
Any window can be moved or resized with the 'MOVE' and 'SIZE' mnemonics. The user can also move any window at any time. The current location is always available with the CTRL() function. If the "user-sizeable" flag is used, the user can also change the size of the window at any time. This can have other side effects, such as adding scroll bars or rescaling a drawing.
Note that by using certain flags, 'WINDOW' can also create a dialog box.
Not all combinations of these flags are valid, but most are acceptable. "Modal dialog style border" precludes all window attributes except scroll bars. This means that the "User sizeable," "Has a close box," "Minimizable/Maximizable," "Initially minimized," "Has menu bar," and "Initially maximized" flags do not work with the "Modal dialog style border" flag.
Historical Color Palette
Under Visual PRO/5 Revision 1.0, all SYSGUI windows automatically received a custom "color cube" palette to accurately display colors in bitmapped images. However, this leads to two problems:
- Microsoft's WIN32s products, Windows and Windows for Workgroups, can stop responding if focus is repeatedly shifted between windows, forcing many rapid palette changes.
- Colors in controls, which are always rendered in the stock system palette, often do not exactly match the colors in the window. For example, an attempt to create a light gray "3-D look" dialog box could create mismatched colors on some systems.
As a result, the custom "color cube" palette is now optional, and by default is not used. In Visual PRO/5 Revision 1.01, SYSGUI windows normally inherit the stock system palette. If you display photographic bitmaps and would like to use the custom "color cube" palette as before for better color accuracy, you must use the window creation flag $00400000$.
Whenever a SYSGUI window with a custom palette gains focus and the display has 256 colors or fewer, some color "flashing" may occur as focus shifts between windows. This is normal and can occur with other applications that require accurate color displays. If flashing becomes a problem, use a display mode that permits more than 256 colors (usually 65,536 colors or 16M colors), a simple wallpaper, or no wallpaper.