MiniGUI API Reference (MiniGUI-Standalone)  v4.0.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Macros
Messages of scrollview control

Macros

#define SVM_ADDITEM   0xF300
 Adds an item in the scrollview. More...
 
#define SVM_DELITEM   0xF301
 Deletes an item from the scrollview. More...
 
#define SVM_SETITEMDRAW   0xF302
 Sets the drawing operation of an item. More...
 
#define SVM_ADDCTRLS   0xF303
 Adds controls to the scrollview. More...
 
#define SVM_SETCONTWIDTH   0xF306
 Sets the scrollview content area (scrollable area) width. More...
 
#define SVM_SETCONTHEIGHT   0xF307
 Sets the scrollview content area (scrollable area) height. More...
 
#define SVM_GETCTRL   0xF308
 Gets the control handle in the scrollview window by control id. More...
 
#define SVM_RESETCONTENT   0xF309
 Clears all the controls and the items added to the scrollview window. More...
 
#define SVM_SETITEMOPS   0xF30a
 Sets the item operations of the items in the scrollview. More...
 
#define SVM_GETMARGINS   0xF30b
 Gets the margin values of the scrollview. More...
 
#define SVM_SETMARGINS   0xF311
 Sets the margin values of the scrollview. More...
 
#define SVM_GETLEFTMARGIN   0xF312
 Gets the left margin value of the scrollview. More...
 
#define SVM_GETTOPMARGIN   0xF313
 Gets the top margin value of the scrollview. More...
 
#define SVM_GETRIGHTMARGIN   0xF314
 Gets the right margin value of the scrollview. More...
 
#define SVM_GETBOTTOMMARGIN   0xF315
 Gets the bottom margin value of the scrollview. More...
 
#define SVM_GETVISIBLEWIDTH   0xF316
 Gets the width of the visible content area. More...
 
#define SVM_GETVISIBLEHEIGHT   0xF317
 Gets the height of the visible content area. More...
 
#define SVM_GETCONTWIDTH   0xF318
 Gets the width of the content area. More...
 
#define SVM_GETCONTHEIGHT   0xF319
 Gets the height of the content area. More...
 
#define SVM_SETCONTRANGE   0xF31a
 Sets the width and height of the content area. More...
 
#define SVM_GETCONTENTX   0xF31b
 Gets the content x offset in the viewport. More...
 
#define SVM_GETCONTENTY   0xF31c
 Gets the content y offset in the viewport. More...
 
#define SVM_SETCONTPOS   0xF31d
 Sets the content offset position in the viewport. More...
 
#define SVM_GETCURSEL   0xF31e
 Gets the index of the current hilighted scrollview item. More...
 
#define SVM_SELECTITEM   0xF31f
 Selects or unselects an item in the scrollview item. More...
 
#define SVM_SHOWITEM   0xF320
 Makes an item visible in the scrollview item. More...
 
#define SVM_CHOOSEITEM   0xF321
 Makes an item selected and visible in the scrollview item. More...
 
#define SVM_SETCURSEL   0xF322
 Makes an item as the current hilighted item in the scrollview item. More...
 
#define SVM_SETITEMINIT   0xF323
 Sets the init operation of the items in the scrollview. More...
 
#define SVM_SETITEMDESTROY   0xF324
 Sets the destroy operation of the items in the scrollview. More...
 
#define SVM_SETITEMCMP   0xF327
 Sets the item compare function. More...
 
#define SVM_MAKEPOSVISIBLE   0xF328
 Makes a position in the content area visible. More...
 
#define SVM_SETCONTAINERPROC   0xF329
 Sets the window procedure of the container window in the scrollview. More...
 
#define SVM_GETFOCUSCHILD   0xF32a
 Gets the focus control in the scrollview. More...
 
#define SVM_GETHSCROLLVAL   0xF32b
 Gets the horizontal scroll value. More...
 
#define SVM_GETVSCROLLVAL   0xF32c
 Gets the vertical scroll value. More...
 
#define SVM_GETHSCROLLPAGEVAL   0xF32d
 Gets the horizontal page scroll value. More...
 
#define SVM_GETVSCROLLPAGEVAL   0xF32e
 Gets the vertical page scroll value. More...
 
#define SVM_SETSCROLLVAL   0xF32f
 Sets the horizontal and vertical scroll value. More...
 
#define SVM_SETSCROLLPAGEVAL   0xF330
 Sets the horizontal and vertical page value. More...
 
#define SVM_SORTITEMS   0xF331
 Sorts the items according to a specified comparision function. More...
 
#define SVM_GETITEMCOUNT   0xF332
 Gets the total number of the items. More...
 
#define SVM_GETITEMADDDATA   0xF333
 Gets the additional data of the item. More...
 
#define SVM_SETITEMADDDATA   0xF334
 Sets the additional data of the item. More...
 
#define SVM_REFRESHITEM   0xF335
 Refresh the item. More...
 
#define SVM_SETITEMHEIGHT   0xF336
 Sets the height of an item. More...
 
#define SVM_GETFIRSTVISIBLEITEM   0xF337
 Gets the index of the first visible item. More...
 

Detailed Description

Macro Definition Documentation

◆ SVM_ADDCTRLS

#define SVM_ADDCTRLS   0xF303

Adds controls to the scrollview.

int itemNr;
PCTRLDATA pctrls;
wParam = (WPARAM)itemNr;
lParam = (LPARAM)pctrls;
Parameters
ctrlNrControl number in the pctrls control array.
pctrlsPoints to a CTRLDATA array that defines controls.
Returns
Zero on success; otherwise -1.

Definition at line 350 of file scrollview.h.

◆ SVM_ADDITEM

#define SVM_ADDITEM   0xF300

Adds an item in the scrollview.

HSVITEM *phsvi;
wParam = (WPARAM)phsvi;
lParam = (LPARAM)&svii;
Parameters
&sviiPointer to a scrollview item information structure.
phsviPointer to a HSVITEM var, used to store the item handle returned.
Returns
Index of the scrollview item on success; otherwise -1.

Definition at line 288 of file scrollview.h.

◆ SVM_CHOOSEITEM

#define SVM_CHOOSEITEM   0xF321

Makes an item selected and visible in the scrollview item.

int nItem;
HSVITEM hsvi;
wParam = (WPARAM)nItem;
lParam = (LPARAM)hsvi;
Parameters
nItemItem index. Be useful when hsvi is zero.
hsviItem handle.
Returns
0 on success, otherwise -1.

Definition at line 754 of file scrollview.h.

◆ SVM_DELITEM

#define SVM_DELITEM   0xF301

Deletes an item from the scrollview.

int nItem;
HSVITEM hsvi;
wParam = (WPARAM)nItem;
lParam = (LPARAM)hsvi;
Parameters
nItemScrollview item index to delete. If hsvi is not zero, nItem will be ignored.
hsviScrollview item handle to delete.
Returns
Zero on success; otherwise -1.

Definition at line 309 of file scrollview.h.

◆ SVM_GETBOTTOMMARGIN

#define SVM_GETBOTTOMMARGIN   0xF315

Gets the bottom margin value of the scrollview.

wParam = 0;
lParam = 0;
Returns
Bottom margin value on success, otherwise -1.

Definition at line 544 of file scrollview.h.

◆ SVM_GETCONTENTX

#define SVM_GETCONTENTX   0xF31b

Gets the content x offset in the viewport.

wParam = 0;
lParam = 0;
Returns
Content x coordinate in the viewport on success, otherwise -1.

Definition at line 641 of file scrollview.h.

◆ SVM_GETCONTENTY

#define SVM_GETCONTENTY   0xF31c

Gets the content y offset in the viewport.

wParam = 0;
lParam = 0;
Returns
Content y coordinate in the viewport on success, otherwise -1.

Definition at line 656 of file scrollview.h.

◆ SVM_GETCONTHEIGHT

#define SVM_GETCONTHEIGHT   0xF319

Gets the height of the content area.

wParam = 0;
lParam = 0;
Returns
Height of the content area on success, otherwise -1.

Definition at line 604 of file scrollview.h.

◆ SVM_GETCONTWIDTH

#define SVM_GETCONTWIDTH   0xF318

Gets the width of the content area.

wParam = 0;
lParam = 0;
Returns
Width of the content area on success, otherwise -1.

Definition at line 589 of file scrollview.h.

◆ SVM_GETCTRL

#define SVM_GETCTRL   0xF308

Gets the control handle in the scrollview window by control id.

int id;
wParam = (WPARAM)id;
lParam = 0;
Parameters
idControl id.
Returns
Control window handle on success; otherwise 0.

Definition at line 408 of file scrollview.h.

◆ SVM_GETCURSEL

#define SVM_GETCURSEL   0xF31e

Gets the index of the current hilighted scrollview item.

An application sends an this message to a scrollview window to get the index of the currently selected item, if there is one, in a single-selection scrollview. For multiple-selection case, appliction send this message to a scrollview to get the index of the current highlighted item.

wParam = 0;
lParam = 0;
Returns
Index of current hilighted item.

Definition at line 695 of file scrollview.h.

◆ SVM_GETFIRSTVISIBLEITEM

#define SVM_GETFIRSTVISIBLEITEM   0xF337

Gets the index of the first visible item.

Returns
Item index.

Definition at line 1100 of file scrollview.h.

◆ SVM_GETFOCUSCHILD

#define SVM_GETFOCUSCHILD   0xF32a

Gets the focus control in the scrollview.

wParam = 0;
lParam = 0;
Returns
Handle of the focus control.

Definition at line 884 of file scrollview.h.

◆ SVM_GETHSCROLLPAGEVAL

#define SVM_GETHSCROLLPAGEVAL   0xF32d

Gets the horizontal page scroll value.

wParam = 0;
lParam = 0;
Returns
Current horizontal page scroll value.

Definition at line 929 of file scrollview.h.

◆ SVM_GETHSCROLLVAL

#define SVM_GETHSCROLLVAL   0xF32b

Gets the horizontal scroll value.

wParam = 0;
lParam = 0;
Returns
Current horizontal scroll value.

Definition at line 899 of file scrollview.h.

◆ SVM_GETITEMADDDATA

#define SVM_GETITEMADDDATA   0xF333

Gets the additional data of the item.

int nItem;
HSVITEM hsvi;
wParam = (WPARAM)nItem;
lParam = (LPARAM)hsvi;
Parameters
nItemScrollview item index to access. If hsvi is not zero, nItem will be ignored.
hsviScrollview item handle to access.
Returns
Item additional data.

Definition at line 1028 of file scrollview.h.

◆ SVM_GETITEMCOUNT

#define SVM_GETITEMCOUNT   0xF332

Gets the total number of the items.

Returns
Number of the items.

Definition at line 1007 of file scrollview.h.

◆ SVM_GETLEFTMARGIN

#define SVM_GETLEFTMARGIN   0xF312

Gets the left margin value of the scrollview.

wParam = 0;
lParam = 0;
Returns
Left margin value on success, otherwise -1.

Definition at line 499 of file scrollview.h.

◆ SVM_GETMARGINS

#define SVM_GETMARGINS   0xF30b

Gets the margin values of the scrollview.

Application should use a RECT structure to get left, top, right, and bottom margins.

RECT rcMargin;
wParam = 0;
lParam = (LPARAM)&rcMargin;
Parameters
rcMarginA RECT for storing 4 margin values.
Returns
0 on success.

Definition at line 463 of file scrollview.h.

◆ SVM_GETRIGHTMARGIN

#define SVM_GETRIGHTMARGIN   0xF314

Gets the right margin value of the scrollview.

wParam = 0;
lParam = 0;
Returns
Right margin value on success, otherwise -1.

Definition at line 529 of file scrollview.h.

◆ SVM_GETTOPMARGIN

#define SVM_GETTOPMARGIN   0xF313

Gets the top margin value of the scrollview.

wParam = 0;
lParam = 0;
Returns
Top margin value on success, otherwise -1.

Definition at line 514 of file scrollview.h.

◆ SVM_GETVISIBLEHEIGHT

#define SVM_GETVISIBLEHEIGHT   0xF317

Gets the height of the visible content area.

wParam = 0;
lParam = 0;
Returns
Height of the visible content area on success, otherwise -1.

Definition at line 574 of file scrollview.h.

◆ SVM_GETVISIBLEWIDTH

#define SVM_GETVISIBLEWIDTH   0xF316

Gets the width of the visible content area.

wParam = 0;
lParam = 0;
Returns
Width of the visible content area on success, otherwise -1.

Definition at line 559 of file scrollview.h.

◆ SVM_GETVSCROLLPAGEVAL

#define SVM_GETVSCROLLPAGEVAL   0xF32e

Gets the vertical page scroll value.

wParam = 0;
lParam = 0;
Returns
Current vertical page scroll value.

Definition at line 944 of file scrollview.h.

◆ SVM_GETVSCROLLVAL

#define SVM_GETVSCROLLVAL   0xF32c

Gets the vertical scroll value.

wParam = 0;
lParam = 0;
Returns
Current vertical scroll value.

Definition at line 914 of file scrollview.h.

◆ SVM_MAKEPOSVISIBLE

#define SVM_MAKEPOSVISIBLE   0xF328

Makes a position in the content area visible.

int pos_x, pos_y;
wParam = (WPARAM)pos_x;
lParam = (LPARAM)pos_y;
Parameters
pos_xX coordinate of the position to be made visible
pos_yY coordinate of the position to be made visible

Definition at line 851 of file scrollview.h.

◆ SVM_REFRESHITEM

#define SVM_REFRESHITEM   0xF335

Refresh the item.

int nitem;
HSVITEM hsvi;
wParam = (WPARAM)nitem;
lParam = (LPARAM)hsvi;
Parameters
nitemItem index. If hsvi is not zero, nItem will be ignored.
hsviItem handle.
Returns
Returns 0.

Definition at line 1068 of file scrollview.h.

◆ SVM_RESETCONTENT

#define SVM_RESETCONTENT   0xF309

Clears all the controls and the items added to the scrollview window.

wParam = 0;
lParam = 0;
Returns
Zero on success; otherwise -1.

Definition at line 423 of file scrollview.h.

◆ SVM_SELECTITEM

#define SVM_SELECTITEM   0xF31f

Selects or unselects an item in the scrollview item.

int nItem;
wParam = (WPARAM)nItem;
lParam = (LPARAM)bSel;
Parameters
nItemIndex of the item to select or unselect.
bSelTo select or unselect.
Returns
0 on success, otherwise -1.

Definition at line 714 of file scrollview.h.

◆ SVM_SETCONTAINERPROC

#define SVM_SETCONTAINERPROC   0xF329

Sets the window procedure of the container window in the scrollview.

WNDPROC pfn;
wParam = 0;
lParam = (LPARAM)pfn;
Parameters
pfnNew container procedure function.
Returns
Old container procedure.

Definition at line 869 of file scrollview.h.

◆ SVM_SETCONTHEIGHT

#define SVM_SETCONTHEIGHT   0xF307

Sets the scrollview content area (scrollable area) height.

Scrollable area of a scrolled window is always larger than the visible area.

int cont_h;
wParam = (WPARAM)cont_h;
lParam = 0;
Parameters
cont_hScrollview content height.
Returns
Zero on success; otherwise -1.

Definition at line 390 of file scrollview.h.

◆ SVM_SETCONTPOS

#define SVM_SETCONTPOS   0xF31d

Sets the content offset position in the viewport.

int cont_x, cont_y;
wParam = (WPARAM)cont_x;
lParam = (LPARAM)cont_y;
Parameters
cont_xNew content x offset
cont_yNew content y offset
Returns
0 on success, otherwise -1.

Definition at line 675 of file scrollview.h.

◆ SVM_SETCONTRANGE

#define SVM_SETCONTRANGE   0xF31a

Sets the width and height of the content area.

If you want to change width and height, give a value large than zero. If you give -1, this value will remain untouched.

int cont_w, cont_h;
wParam = (WPARAM)cont_w;
lParam = (LPARAM)cont_h;
Parameters
cont_wWidth of the content area.
cont_hHeight of the content area.
Returns
0 on success, otherwise -1.

Definition at line 626 of file scrollview.h.

◆ SVM_SETCONTWIDTH

#define SVM_SETCONTWIDTH   0xF306

Sets the scrollview content area (scrollable area) width.

Scrollable area of a scrolled window is always larger than the visible area.

int cont_w;
wParam = (WPARAM)cont_w;
lParam = 0;
Parameters
cont_wScrollview content width.
Returns
Zero on success; otherwise -1.

Definition at line 370 of file scrollview.h.

◆ SVM_SETCURSEL

#define SVM_SETCURSEL   0xF322

Makes an item as the current hilighted item in the scrollview item.

int nItem;
BOOL bVisible;
wParam = (WPARAM)nItem;
lParam = (LPARAM)bVisible;
Parameters
nitemItem index.
bVisibleIf bVisible is TRUE, this item wille be made visible.
Returns
old hilighted item index on success, otherwise -1.

Definition at line 774 of file scrollview.h.

◆ SVM_SETITEMADDDATA

#define SVM_SETITEMADDDATA   0xF334

Sets the additional data of the item.

int nitem;
int addData;
wParam = (WPARAM)nitem;
lParam = (LPARAM)addData;
Parameters
nitemItem index.
addDataAdditional data
Returns
Old item additional data.

Definition at line 1048 of file scrollview.h.

◆ SVM_SETITEMCMP

#define SVM_SETITEMCMP   0xF327

Sets the item compare function.

wParam = 0;
lParam = (LPARAM)pfn;
Parameters
pfnNew item compare function
Returns
Old function on success; otherwise NULL.

Definition at line 834 of file scrollview.h.

◆ SVM_SETITEMDESTROY

#define SVM_SETITEMDESTROY   0xF324

Sets the destroy operation of the items in the scrollview.

Normally item operations should be set before adding items. The destroy callback function will be called when deleting an item

wParam = 0;
lParam = (LPARAM)pfn;
Parameters
pfnItem destroy operation function
Returns
Old function on success; otherwise NULL.

Definition at line 816 of file scrollview.h.

◆ SVM_SETITEMDRAW

#define SVM_SETITEMDRAW   0xF302

Sets the drawing operation of an item.

Scrollview item drawing function will be called when doing with MSG_PAINT message, scrollview window should define this function if it want to draw an customed item.

wParam = 0;
lParam = (LPARAM)pfn;
Parameters
pfnScrollview item drawing function.
Returns
Old drawing function pointer; otherwise 0.

Definition at line 330 of file scrollview.h.

◆ SVM_SETITEMHEIGHT

#define SVM_SETITEMHEIGHT   0xF336

Sets the height of an item.

int nitem;
int height;
wParam = (WPARAM)nitem;
lParam = (LPARAM)height;
Parameters
nitemItem index.
heightNew height of the item
Returns
Old item height.

Definition at line 1088 of file scrollview.h.

◆ SVM_SETITEMINIT

#define SVM_SETITEMINIT   0xF323

Sets the init operation of the items in the scrollview.

Normally item operations should be set before adding items. The initialization callback function will be called when adding an item.

wParam = 0;
lParam = (LPARAM)pfn;
Parameters
pfnItem init operation function
Returns
Old function on success; otherwise NULL.

Definition at line 795 of file scrollview.h.

◆ SVM_SETITEMOPS

#define SVM_SETITEMOPS   0xF30a

Sets the item operations of the items in the scrollview.

Normally item operations should be set before adding items.

SVITEMOPS *iop;
wParam = 0;
lParam = (LPARAM)iop;
Parameters
iopPoints to a SVITEMOPS structure that defines item operations
Returns
Zero on success; otherwise -1.

Definition at line 443 of file scrollview.h.

◆ SVM_SETMARGINS

#define SVM_SETMARGINS   0xF311

Sets the margin values of the scrollview.

Application should use a RECT structure to give left, top, right, and bottom margins. If you want to change a margin value, give a value large than zero, or else -1.

RECT *rcMargin;
wParam = 0;
lParam = (LPARAM)rcMargin;
Parameters
rcMarginA RECT Containing 4 margin values.
Returns
0 on success.

Definition at line 484 of file scrollview.h.

◆ SVM_SETSCROLLPAGEVAL

#define SVM_SETSCROLLPAGEVAL   0xF330

Sets the horizontal and vertical page value.

int hval, vval;
wParam = (WPARAM)hval;
lParam = (WPARAM)vval;
Parameters
hvalNew horizontal page value.
vvalNew vertical page value.
Returns
Zero.

Definition at line 982 of file scrollview.h.

◆ SVM_SETSCROLLVAL

#define SVM_SETSCROLLVAL   0xF32f

Sets the horizontal and vertical scroll value.

int hval, vval;
wParam = (WPARAM)hval;
lParam = (LPARAM)vval;
Parameters
hvalNew horizontal scroll value.
vvalNew vertical scroll value.
Returns
Zero.

Definition at line 963 of file scrollview.h.

◆ SVM_SHOWITEM

#define SVM_SHOWITEM   0xF320

Makes an item visible in the scrollview item.

int nItem;
HSVITEM hsvi;
wParam = (WPARAM)nItem;
lParam = (LPARAM)hsvi;
Parameters
nItemItem index. Be useful when hsvi is zero.
hsviItem handle.
Returns
0 on success, otherwise -1.

Definition at line 734 of file scrollview.h.

◆ SVM_SORTITEMS

#define SVM_SORTITEMS   0xF331

Sorts the items according to a specified comparision function.

lParam = pfn;
Parameters
pfnComparision function.
Returns
Zero.

Definition at line 999 of file scrollview.h.