MiniGUI API Reference (MiniGUI-Threads)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Structures | Macros | Typedefs | Functions
Scroll bar operations

Data Structures

struct  _SCROLLINFO
 

Macros

#define SB_ARROW_LTUP   0x0001
 
#define SB_ARROW_BTDN   0x0002
 
#define SB_ARROW_BOTH   (SB_ARROW_LTUP | SB_ARROW_BTDN)
 

Typedefs

typedef struct _SCROLLINFO SCROLLINFO
 

Functions

MG_EXPORT BOOL GUIAPI EnableScrollBar (HWND hWnd, int iSBar, BOOL bEnable)
 Enables or disables one scroll bar arrows. More...
 
MG_EXPORT BOOL GUIAPI GetScrollPos (HWND hWnd, int iSBar, int *pPos)
 Retrieves the current position of the scroll box (thumb) in the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI GetScrollRange (HWND hWnd, int iSBar, int *pMinPos, int *pMaxPos)
 Retrives the minimum and maximum position values for the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollPos (HWND hWnd, int iSBar, int iNewPos)
 Sets the position of the scroll box (thumb) of the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollRange (HWND hWnd, int iSBar, int iMinPos, int iMaxPos)
 Sets the minimum and maximum position values for the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow)
 Shows or hides the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollInfo (HWND hWnd, int iSBar, const SCROLLINFO *lpsi, BOOL fRedraw)
 Sets the parameters of a scroll bar. More...
 
MG_EXPORT BOOL GUIAPI GetScrollInfo (HWND hWnd, int iSBar, PSCROLLINFO lpsi)
 Retrieves the parameters of a scroll bar. More...
 

Detailed Description

Macro Definition Documentation

#define SB_ARROW_BOTH   (SB_ARROW_LTUP | SB_ARROW_BTDN)

left,up, right or bottom arrow

Definition at line 7229 of file window.h.

#define SB_ARROW_BTDN   0x0002

right or bottom arrow

Definition at line 7226 of file window.h.

#define SB_ARROW_LTUP   0x0001

left or up arrow

Definition at line 7223 of file window.h.

Typedef Documentation

typedef struct _SCROLLINFO SCROLLINFO

Scroll bar information structure.

Function Documentation

BOOL GUIAPI EnableScrollBar ( HWND  hWnd,
int  iSBar,
BOOL  bEnable 
)

Enables or disables one scroll bar arrows.

This function enables or disables one scroll bar arrows.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
bEnableIndicates whether to enable or disable the scroll bar.
Returns
TRUE on success, FALSE on error.
See also
ShowScrollBar
BOOL GUIAPI GetScrollInfo ( HWND  hWnd,
int  iSBar,
PSCROLLINFO  lpsi 
)

Retrieves the parameters of a scroll bar.

This function retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
lpsiThe pointer to a structure of SCROLLINFO which receives the parameters.
Returns
TRUE on success, FALSE on error.
See also
SetScrollInfo, SCROLLINFO
BOOL GUIAPI GetScrollPos ( HWND  hWnd,
int  iSBar,
int *  pPos 
)

Retrieves the current position of the scroll box (thumb) in the specified scroll bar.

This function retrieves the current position of the scroll box (thumb) in the specified scroll bar. The current position is a relative value that depends on the current scrolling range.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
pPosThe pointer to a integer which receives the position value.
Returns
TRUE on success, FALSE on error.
See also
SetScrollPos
BOOL GUIAPI GetScrollRange ( HWND  hWnd,
int  iSBar,
int *  pMinPos,
int *  pMaxPos 
)

Retrives the minimum and maximum position values for the specified scroll bar.

This function retrives the minimum and maximum position values for the specified scroll bar.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
pMinPosThe pointer to a integer which receives the minimum position value.
pMaxPosThe pointer to a integer which receives the maximum position value.
Returns
TRUE on success, FALSE on error.
See also
SetScrollRange
BOOL GUIAPI SetScrollInfo ( HWND  hWnd,
int  iSBar,
const SCROLLINFO lpsi,
BOOL  fRedraw 
)

Sets the parameters of a scroll bar.

This function sets the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb). The function also redraws the scroll bar, if requested.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
lpsiThe pointer to the structure of scroll bar information.
fRedrawA boolean indicates whether to redraw the scroll bar.
Returns
TRUE on success, FALSE on error.
See also
GetScrollInfo, SCROLLINFO
BOOL GUIAPI SetScrollPos ( HWND  hWnd,
int  iSBar,
int  iNewPos 
)

Sets the position of the scroll box (thumb) of the specified scroll bar.

This function sets the position of the scroll box (thumb) of the specified scroll bar, and if needed, redraws the scroll bar to reflect the new position of the scroll box.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
iNewPosThe new position value.
Returns
TRUE on success, FALSE on error.
See also
GetScrollPos
BOOL GUIAPI SetScrollRange ( HWND  hWnd,
int  iSBar,
int  iMinPos,
int  iMaxPos 
)

Sets the minimum and maximum position values for the specified scroll bar.

This function sets the minimum and maximum position values for the specified scroll bar, and if needed, redraws the scroll bar to reflect the new position values of the scroll box.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
iMinPosThe new minimum position value.
iMaxPosThe new maximum position value.
Returns
TRUE on success, FALSE on error.
See also
GetScrollRange
BOOL GUIAPI ShowScrollBar ( HWND  hWnd,
int  iSBar,
BOOL  bShow 
)

Shows or hides the specified scroll bar.

This function shows or hides the specified scroll bar.

Parameters
hWndThe handle to the window.
iSBarIndicates to enable or disable which scroll bar, can be one of the following values:
  • SB_HORZ
    The horizontal scroll bar.
  • SB_VERT
    The vertical scroll bar.
bShowIndicates whether show or hide the scrollbar.
Returns
TRUE on success, FALSE on error.
See also
EnableScrollBar