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 scrollbar control

Macros

#define SBM_GETSCROLLINFO   0xF0E0
 Get the scroll information of the scrollbar. More...
 
#define SBM_SETSCROLLINFO   0xF0E1
 Set the scroll information of the scrollbar. More...
 
#define SBM_GETPOS   0xF0E2
 Get the thumb pos of the scrollbar. More...
 
#define SBM_SETPOS   0xF0E3
 Set the thumb pos of the scrollbar. More...
 
#define SBM_GETRANGE   0xF0E4
 Get the range of the scrollbar. More...
 
#define SBM_SETRANGE   0xF0E5
 Set the range of the scrollbar. More...
 
#define SBM_SETRANGEREDRAW   0xF0E6
 Set the range of the scrollbar. More...
 
#define SBM_ENABLE_ARROW   0xF0E7
 Enable or disable the arrow of the scrollbar. More...
 

Detailed Description

Macro Definition Documentation

#define SBM_ENABLE_ARROW   0xF0E7

Enable or disable the arrow of the scrollbar.

An application sends a SBM_ENABLE_ARROW message to enable or disable the arrow button of the scrollbar.

1 SBM_ENABLE_ARROW
2 int which = SB_ARROW_LTUP;
3 BOOL is_active;
4 
5 wParam = (WPARAM)which;
6 lParam = (LPARAM)is_active;
7 SendMessage (hwnd_scrollbar, SBM_ENABLE_ARROW, wParam, lParam);
Parameters
whichthe part of the scrollbar to enable or disable, can be one of the follow value:
  • SB_ARROW_LTUP
    the left or up arrow button.
  • SB_ARROW_BTDN
    the right or down arrow button.
  • SB_ARROW_BOTH
    all the arrow button.
is_activeTRUE for enable ,FALSE for disable.

Definition at line 314 of file scrollbar.h.

#define SBM_GETPOS   0xF0E2

Get the thumb pos of the scrollbar.

An application sends a SBM_GETPOS message to get the start position of the scrollbar thumb.

1 SBM_GETPOS
2 int pos;
3 
4 pos = SendMessage (hwnd_scrollbar, SBM_GETPOS, 0, 0);
Returns
the postion of the thumb.

Definition at line 194 of file scrollbar.h.

#define SBM_GETRANGE   0xF0E4

Get the range of the scrollbar.

An application sends a SBM_GETRANGE message to get the move range of the scrollbar.

1 SBM_GETRANGE
2 int range;
3 
4 range = SendMessage (hwnd_scrollbar, SBM_GETRANGE, 0, 0);
Returns
the range of the scrollbar.

Definition at line 236 of file scrollbar.h.

#define SBM_GETSCROLLINFO   0xF0E0

Get the scroll information of the scrollbar.

Definition at line 170 of file scrollbar.h.

#define SBM_SETPOS   0xF0E3

Set the thumb pos of the scrollbar.

An application sends a SBM_SETPOS message to set the start position of the scrollbar thumb.

1 SBM_SETPOS
2 int pos = 10;
3 BOOL redraw = TRUE;
4 
5 wParam = (WPARAM)pos;
6 lParam = (LPARAM)redraw;
7 SendMessage (hwnd_scrollbar, SBM_SETPOS, wParam, lParam);
Parameters
posThe new positon of the thumb to set.
redrawWhether to repaint the control, TRUE for repaint, FALSE for not.
Returns
the old postion of the thumb.

Definition at line 218 of file scrollbar.h.

#define SBM_SETRANGE   0xF0E5

Set the range of the scrollbar.

An application sends a SBM_SETRANGE message to set the move range of the scrollbar.

1 SBM_SETRANGE
2 int min = 0;
3 int max = 100;
4 
5 wParam = (WPARAM)min;
6 lParam = (LPARAM)max;
7 SendMessage (hwnd_scrollbar, SBM_SETRANGE, wParam, lParam);
Parameters
minThe minimum value of the range to set.
maxThe maximum value of the range to set.
Note
this message will not redraw the control.

Definition at line 260 of file scrollbar.h.

#define SBM_SETRANGEREDRAW   0xF0E6

Set the range of the scrollbar.

An application sends a SBM_SETRANGEREDRAW message to set the move range of the scrollbar and redraw the control.

1 SBM_SETRANGEREDRAW
2 int min = 0;
3 int max = 100;
4 
5 wParam = (WPARAM)min;
6 lParam = (LPARAM)max;
7 SendMessage (hwnd_scrollbar, SBM_SETRANGEREDRAW, wParam, lParam);
Parameters
minThe minimum value of the range to set.
maxThe maximum value of the range to set.
Note
this message will redraw the control.

Definition at line 284 of file scrollbar.h.

#define SBM_SETSCROLLINFO   0xF0E1

Set the scroll information of the scrollbar.

Definition at line 176 of file scrollbar.h.