sfm_cuabdr()

Adds a CUA border to a form

Call
#include <vv_cuabd.h>
int sfm_cuabdr(menuitems, menuact_att, menu_att, mm_buttons, act_att, inact_att, titlep, title_att, dfmp)

int menuitems

Items for the system menu

UCHAR menuact_att Active attribute for CUA system menu items
UCHAR menu_att Attribute for CUA system menu and inactive items
int mm_buttons Minimize and/or maximize push buttons
UCHAR act_att Pushbutton attribute when active
UCHAR inact_att; Pushbutton attribute when inactive
UCHAR * titlep Pointer to title text string
UCHAR title_att Attribute for CUA title
DFORMPTR dfmp Pointer to form to assign CUA border to
menuitems: Specify the menu items desired for the CUA border system menu. Multiple items can be specified with the OR operator '|'. If any items are specified, a system-menu pushbutton will be added to the CUA border. The available CUA menu items are listed below, in the order they will appear on the CUA system menu:
CUA_RESTORE adds "Restore" for restoring a form to its previous size and position.
CUA_MOVE adds "Move" for moving the form with the keyboard.
CUA_SIZE adds "Size" for resizing the form with keyboard.
CUA_MINIMIZE adds "Minimize", which minimizes a form.
CUA_MAXIMIZE adds "Maximize", which maximizes a form.
CUA_CLOSE adds "Close", which quits the form.
CUA_NONE No CUA items.
CUA_ALL All applicable CUA items.
menuact_att: Specify the logical attribute to use for an active CUA system menu item.

menu_att: Specify the logical attribute to use for the CUA system menu and inactive CUA system menu items.

mm_buttons: Specifying CUA_MINIMIZE and/or CUA_MAXIMIZE for mm_buttons will cause CUA minimize and/or maximize pushbuttons to be added to the CUA border. To add both pushbuttons, use the bitwise OR operator '|', or specify CUA_ALL. For no minimize/maximize pushbuttons, specify CUA_NONE.

act_att: Specify the logical attribute to use when a CUA border pushbutton is active.

inact_att: Specify the logical attribute to use when a CUA border pushbutton is inactive.

titlep: A pointer to a null-terminated string containing the title text.

title_att: Specify the logical attribute to for the CUA border title.is inactive.

Returns
1 Success. The CUA border has been added or removed.
0 Failure. Not enough memory to add the CUA border.
Description

sfm_cuabdr() builds a CUA title bar into a form's top border. If any system menu items are specified, a CUA system-menu pushbutton is placed at the left of the border and a CUA system menu is built. If a title is specified, it is centered in the border. Any minimize/maximize pushbuttons specified are added at the right of the border.

Cautions

The form must have a border before sfm_cuabdr() is called.

sfm_cuabdr() removes all existing text from the form's top border. Text on other borders is not affected by sfm_cuabdr().


Home Contents Previous Next