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

◆ SBM_ENABLE_ARROW

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

int which = SB_ARROW_LTUP;
BOOL is_active;
wParam = (WPARAM)which;
lParam = (LPARAM)is_active;
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 326 of file scrollbar.h.

◆ SBM_GETPOS

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

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

Definition at line 206 of file scrollbar.h.

◆ SBM_GETRANGE

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

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

Definition at line 248 of file scrollbar.h.

◆ SBM_GETSCROLLINFO

#define SBM_GETSCROLLINFO   0xF0E0

Get the scroll information of the scrollbar.

Definition at line 182 of file scrollbar.h.

◆ SBM_SETPOS

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

int pos = 10;
BOOL redraw = TRUE;
wParam = (WPARAM)pos;
lParam = (LPARAM)redraw;
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 230 of file scrollbar.h.

◆ SBM_SETRANGE

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

int min = 0;
int max = 100;
wParam = (WPARAM)min;
lParam = (LPARAM)max;
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 272 of file scrollbar.h.

◆ SBM_SETRANGEREDRAW

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

int min = 0;
int max = 100;
wParam = (WPARAM)min;
lParam = (LPARAM)max;
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 296 of file scrollbar.h.

◆ SBM_SETSCROLLINFO

#define SBM_SETSCROLLINFO   0xF0E1

Set the scroll information of the scrollbar.

Definition at line 188 of file scrollbar.h.

WPARAM
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:706
SBM_SETRANGE
#define SBM_SETRANGE
Set the range of the scrollbar.
Definition: scrollbar.h:272
SBM_ENABLE_ARROW
#define SBM_ENABLE_ARROW
Enable or disable the arrow of the scrollbar.
Definition: scrollbar.h:326
BOOL
int BOOL
A type definition for boolean value.
Definition: common.h:343
SBM_SETRANGEREDRAW
#define SBM_SETRANGEREDRAW
Set the range of the scrollbar.
Definition: scrollbar.h:296
SB_ARROW_LTUP
#define SB_ARROW_LTUP
Definition: window.h:9551
SBM_GETRANGE
#define SBM_GETRANGE
Get the range of the scrollbar.
Definition: scrollbar.h:248
SBM_GETPOS
#define SBM_GETPOS
Get the thumb pos of the scrollbar.
Definition: scrollbar.h:206
SBM_SETPOS
#define SBM_SETPOS
Set the thumb pos of the scrollbar.
Definition: scrollbar.h:230
TRUE
#define TRUE
TRUE value, defined as 1 by MiniGUI.
Definition: common.h:358
LPARAM
UINT_PTR LPARAM
A type definition for the second message paramter.
Definition: common.h:712
SendMessage
MG_EXPORT LRESULT GUIAPI SendMessage(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
Send a message to a window and wait for the handling result.