  btnCreate(string label,x,y,width,style)

Creates a new text button and returns its number. Buttons are numbered in sequence of their creation, starting with number 1. Text buttons, bitmap buttons, and check boxes use the same numbering sequence.

label - Contains the text label of the button.

x - The x-coordinate of the left side of the button. This position does not include the frame. If x is set to -1, the button is created on the right side of the previously created one.

y - The y-coordinate of the top side of the button. This position does not include the frame. If y is set to -1, the button uses the y-coordinate of the previously created button.

width - The width of the button without a frame. If width is set to -1, Bill Winn's formula is used to estimate the width from the number of characters in label.

style - The style of the button. style is a sum of several bits:

0x001 - If this bit is set, the button has a solid frame.

0x002 - If this bit is set, the button has a dotted frame.

0x004 - If this bit is set, the frame has rounded corners.

0x020 - If this bit is set, the button is hidden.

0x080 - If this bit is set, the button is a radio button.

0x100 - This bit marks the selected radio button. Only one button can be selected in each group.

0x200 - This bit marks the first radio button in a group, and hence starts a new group.

  btnCreateBitmap(string label,x,y,style)

Creates a new bitmap button and returns its number.

label - Contains the bitmap that is used as label.

x - The x-coordinate of the left side of the button. This position does not include the frame. If x is set to -1, the button is created on the right side of the previously created one.

y - The y-coordinate of the top side of the button. This position does not include the frame. If y is set to -1, the button uses the y-coordinate of the previously created button.

style - The style of the button. style is a sum of several bits:

0x001 - If this bit is set, the button has a solid frame.

0x002 - If this bit is set, the button has a dotted frame.

0x004 - If this bit is set, the frame has rounded corners.

0x020 - If this bit is set, the button is hidden.

0x080 - If this bit is set, the button is a radio button.

0x100 - This bit marks the selected radio button. Only one button can be selected in each group.

0x200 - This bit marks the first radio button in a group, and hence starts a new group.

  btnCreateCheck(x,y,style)

Creates a new check box and returns its number.

x - The x-coordinate of the left side of the check box. This position does not include the frame. If x is set to -1, the check box is created on the right side of the previously created button.

y - The y-coordinate of the top side of the check box. This position does not include the frame. If y is set to -1, the check box uses the y-coordinate of the previously created button.

style - The style of the check box. style is a sum of several bits:

0x001 - If this bit is set, the check box has an additional solid frame.

0x002 - If this bit is set, the button has an additional dotted frame.

0x004 - If this bit is set, the additional frame has rounded corners.

0x008 - If this bit is set, the check box is checked.

0x020 - If this bit is set, the check box is hidden.

0x080 - If this bit is set, the button is a radio button. Check boxes can be in radio button groups, but they cannot be selected with the pen, similarly to the "ToDo" application. To select a check box in a radio button group, use btnSelect().

0x100 - This bit marks the selected radio button. Only one button can be selected in each group.

0x200 - This bit marks the first radio button in a group, and hence starts a new group.

  btnReset()

Deletes all buttons but does not remove them from screen. Can be used to delete all buttons of a form before creating another form. It is not necessary to call this function before creating the buttons of the first form.

  btnPaintAll()

Paints all buttons. This function should be called to paint all buttons after they were created, or to repaint them, e.g., after a dialog was displayed.

  btnEvent(int e)

Handles the event e. This should be called whenever a new event arrives. The function returns 1 if it has handled the event and 0 if it has not, e.g., because the user clicked outside of all buttons.

  btnPressed()

Returns the number of the button that was pressed during the last btnEvent() or 0 if no button was pressed. A button only was "pressed" if the user clicked and also released the pen inside of the button.

  btnSelected(int i)

Returns the number of the currently selected button in a button group. i can be the number of any button in the same group.

  btnChecked(int i)

Returns 1 if the check box is checked, and 0 if it is not.

  btnSetLabel(int i,string label)

Replaces the label of the button with number i. label must be either a text or a bitmap, depending on the style of button i. The button is repainted but not resized. Therefore, the new label should have the same size as the old one.

  btnSelect(int i)

Selects the button i in a button group. The unselected and the selected buttons are repainted.

  btnCheck(int i,int state)

If state is 1, check box i is checked. If it is 0, the check box is cleared.

  btnHide(int i,int state)

If state is 1, button i is hidden. If it is 0, the button is repainted.
<  >