WINDOW Mnemonic - Create a SYSGUI Window




For BBj-specific information, see the WINDOW Mnemonic - Create SYSGUI Window BBj.

The 'WINDOW' mnemonic creates a SYSGUI window.




Horizontal position of the upper-left corner of the window in current units.


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.


Width of the window in current units.


Height of the window in current units.


Window title. This is the initial title and can be changed at any time with the 'TITLE' mnemonic.


Window flags, as follows:






Allows the window to be resized.



Enables the close box on the window frame. On some platforms, the close box may not appear on the frame if this option is not set



Causes a horizontal scroll bar to appear whenever the window is resized to be smaller than its initial size and 'TRACK'(0) is specified.



Causes a vertical scroll bar to appear whenever the window is resized to be smaller than its initial size and 'TRACK'(0) is specified.



Sets the window to be initially invisible.



Sets the window to be initially disabled.



Allows the window to be maximized or minimized.



Sets the window to be initially minimized.



Include menu bar. Creates a menu bar.



Sets the window to be initially maximized.



Prevents the separator line between the menu and client area of a window from being drawn.



Activates keyboard navigation in the window.



Always positions the window on top of other windows.



Creates a border around the dialog.



Sets the window to behave as a dialog.



Automatically arranges all controls and child windows placed in the window to fit.



Allows use of a custom color palette. This provides a more accurate display of colors in bitmapped images.



Sets the Enter key to behave as a Tab key.



Creates the window without a title bar.



Sets the window to automatically manage SYSCOLOR events.



Causes Visual PRO/5 to report the mouse's right button down event.


Event masks to be applied to the window:



User changed system colors



Window activation



Right mouse button down



Check or uncheck or check box or radio button.



Click or double click on list item. 


None – Always sent

Close box operated.



Edit or list edit modified.



Edit, list edit, or text edit focus change.



Key pressed.


None – Always sent

Menu selection made.



Mouse button double click.






Mouse button down.



Mouse button up.



Mouse moved.


None – Always sent

Push button operated.



Scroll bar position changed.


None – Always sent

Tool button operated.



Window resized.



Window focus change.


None – Always sent

Popup Menu Selection.






Push Button




Control Focus Gained/Lost


Edit Control Modify




List Item Click

l (lower case L)

Menu Selection


Mouse Enter/Exit


Mouse Scroll Wheel


Mouse Button Down


Mouse Button Up


Mouse Double-Click


Mouse Move




Right Mouse Button Down


Scrollbar Move


System Color Change


Tool Button Push


Window Close Box


Window Focus Gained/Lost


Window Resize


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.

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing