Simulating Menu Clicks

The _wmenuclick function emulates the user choosing one of the menu commands that are standard on all QuickWin applications. By giving a program access to these commands it can more completely control its appearance on the screen.

The function accepts one parameter that indicates which command to choose. The following parameters are currently supported:

_WINTILE

Tiles the windows

_WINCASCADE

Cascades the windows

_WINARRANGE

Arranges the icons of any closed windows

_WINSTATBAR

Turns the Status Bar on if it is off, or off if it is on

The _wmenuclick function does not change which window is active, but may change its size and placement on the screen. For example, the following line cascades all the currently open windows and places the active window on top:

iWMC = _wmenuclick(_WINCASCADE);

The integer return value is 0 if the operation succeeds or -1 if it fails.