MiniGUI API Reference (MiniGUI-Processes)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Macros
Messages of button control

Macros

#define BM_GETCHECK   0xF0F0
 Retrieves the check state of a radio button or check box. More...
 
#define BM_SETCHECK   0xF0F1
 Sets the check state of a radio button or check box. More...
 
#define BM_GETSTATE   0xF0F2
 Gets the state of a button or check box. More...
 
#define BM_SETSTATE   0xF0F3
 Sets the state of a button. More...
 
#define BM_SETSTYLE   0xF0F4
 Changes the style of a button. More...
 
#define BM_CLICK   0xF0F5
 Simulates the user clicking a button. More...
 
#define BM_ENABLE   0xF0F6
 enable or disable the button. If it is disabled, it can receive mouse and key messages but don't response them More...
 
#define BM_GETIMAGE   0xF0F7
 Retrieves the handle to the image. More...
 
#define BM_SETIMAGE   0xF0F8
 Associates a new image (icon or bitmap) with the button. More...
 

Detailed Description

Macro Definition Documentation

#define BM_CLICK   0xF0F5

Simulates the user clicking a button.

An application sends a BM_CLICK message to simulate the user clicking a button.

1 BM_CLICK
2 
3 wParam = 0;
4 lParam = 0;

Definition at line 537 of file button.h.

#define BM_ENABLE   0xF0F6

enable or disable the button. If it is disabled, it can receive mouse and key messages but don't response them

1 BM_CLICK
2 
3 wParam = (BOOL)enable;
4 lParam = 0;
Parameters
enableTRUE–enable the button FALSE–disable the button.
Returns
Always be zero.

Definition at line 556 of file button.h.

#define BM_GETCHECK   0xF0F0

Retrieves the check state of a radio button or check box.

An application sends a BM_GETCHECK message to retrieve the check state of a radio button or check box.

1 BM_GETCHECK
2 wParam = 0;
3 lParam = 0;
Returns
An integer indicates whether the button is checked.
Return values
BST_UNCHECKEDThe button is not checked.
BST_CHECKEDThe button is checked.
BST_INDETERMINATEThe button is grayed because the state of the button is indeterminate.
See also
States of button control

Definition at line 430 of file button.h.

#define BM_GETIMAGE   0xF0F7

Retrieves the handle to the image.

An application sends a BM_GETIMAGE message to retrieve a handle to the image (icon or bitmap) associated with the button.

1 BM_GETIMAGE
2 int image_type;
3 
4 wParam = (WPARAM)&image_type;
5 lParam = 0;
Parameters
image_typeThe type of a button image will be returned through this buferr. It can be one of the following values:
  • BM_IMAGE_BITMAP
    Bitmap of a button.
  • BM_IMAGE_ICON
    Icon of a button.
Returns
A handle of the bitmap or icon of the button, zero when error.

Definition at line 582 of file button.h.

#define BM_GETSTATE   0xF0F2

Gets the state of a button or check box.

An application sends a BM_GETSTATE message to determine the state of a button or check box.

1 BM_GETSTATE
2 wParam = 0;
3 lParam = 0;
Returns
An integer indicates the button state.
See also
States of button control

Definition at line 475 of file button.h.

#define BM_SETCHECK   0xF0F1

Sets the check state of a radio button or check box.

An application sends a BM_SETCHECK message to set the check state of a radio button or check box.

1 BM_SETCHECK
2 int check_state;
3 
4 wParam = (WPARAM)check_state;
5 lParam = 0;
Parameters
check_stateThe check state of button, can be one of the following values:
  • BST_UNCHECKED
    Want the button to be unchecked.
  • BST_CHECKED
    Want the button to be checked.
  • BST_INDETERMINATE
    Want the button to be grayed if it is a three states button.
Returns
The old button state.

Definition at line 456 of file button.h.

#define BM_SETIMAGE   0xF0F8

Associates a new image (icon or bitmap) with the button.

An application sends a BM_SETIMAGE message to associate a new image (icon or bitmap) with the button.

Please use BM_IMAGE_BITMAP or BM_IMAGE_ICON as the first parameter of the message to indicate the type of button control image:

  • BM_IMAGE_BITMAP
    Specifies the type of image to associate with the button to be a bitmap.
  • BM_IMAGE_ICON
    Specifies the type of image to associate with the button to be an icon.

Definition at line 601 of file button.h.

#define BM_SETSTATE   0xF0F3

Sets the state of a button.

An application sends a BM_SETSTATE message to set the state of a button.

1 BM_SETSTATE
2 int push_state;
3 
4 wParam = (WPARAM)push_state;
5 lParam = 0;
Parameters
push_stateThe push state of a button, can be one of the following values:
  • Zero
    Want the button to be unpushed.
  • Non zero
    Want the button to be pushed.
Returns
The old button state.

Definition at line 500 of file button.h.

#define BM_SETSTYLE   0xF0F4

Changes the style of a button.

An application sends a BM_SETSTYLE message to change the style of a button.

1 BM_SETSTYLE
2 int button_style;
3 
4 wParam = (WPARAM)button_style;
5 lParam = 0;
Parameters
button_styleThe styles of a button.
Returns
Always be zero.
See also
Styles of button control

Definition at line 522 of file button.h.