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

Macros

#define BM_GETCHECK   0xF0F0
 Retrieve the check state of a radio button or check box. More...
 
#define BM_SETCHECK   0xF0F1
 Set the check state of a radio button or check box. More...
 
#define BM_GETSTATE   0xF0F2
 Get the state of a button or check box. More...
 
#define BM_SETSTATE   0xF0F3
 Set 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
 Retrieve 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

◆ BM_CLICK

#define BM_CLICK   0xF0F5

Simulates the user clicking a button.

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

wParam = 0;
lParam = 0;

Definition at line 549 of file button.h.

◆ BM_ENABLE

#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

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

Definition at line 568 of file button.h.

◆ BM_GETCHECK

#define BM_GETCHECK   0xF0F0

Retrieve 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.

wParam = 0;
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 442 of file button.h.

◆ BM_GETIMAGE

#define BM_GETIMAGE   0xF0F7

Retrieve 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.

int image_type;
wParam = (WPARAM)&image_type;
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 594 of file button.h.

◆ BM_GETSTATE

#define BM_GETSTATE   0xF0F2

Get 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.

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

Definition at line 487 of file button.h.

◆ BM_SETCHECK

#define BM_SETCHECK   0xF0F1

Set 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.

int check_state;
wParam = (WPARAM)check_state;
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 468 of file button.h.

◆ BM_SETIMAGE

#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 613 of file button.h.

◆ BM_SETSTATE

#define BM_SETSTATE   0xF0F3

Set the state of a button.

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

int push_state;
wParam = (WPARAM)push_state;
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 512 of file button.h.

◆ BM_SETSTYLE

#define BM_SETSTYLE   0xF0F4

Changes the style of a button.

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

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

Definition at line 534 of file button.h.

BM_CLICK
#define BM_CLICK
Simulates the user clicking a button.
Definition: button.h:549
WPARAM
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:706
BM_GETCHECK
#define BM_GETCHECK
Retrieve the check state of a radio button or check box.
Definition: button.h:442
BM_SETSTYLE
#define BM_SETSTYLE
Changes the style of a button.
Definition: button.h:534
BOOL
int BOOL
A type definition for boolean value.
Definition: common.h:343
BM_GETIMAGE
#define BM_GETIMAGE
Retrieve the handle to the image.
Definition: button.h:594
BM_SETSTATE
#define BM_SETSTATE
Set the state of a button.
Definition: button.h:512
BM_SETCHECK
#define BM_SETCHECK
Set the check state of a radio button or check box.
Definition: button.h:468
BM_GETSTATE
#define BM_GETSTATE
Get the state of a button or check box.
Definition: button.h:487