MiniGUI API Reference (MiniGUI-Standalone)  v3.2.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

#define SVM_ADDCTRLS   0xF303

Adds controls to the scrollview.

1 SVM_ADDCTRLS
2 int itemNr;
3 PCTRLDATA pctrls;
4 
5 wParam = (WPARAM)itemNr;
6 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 338 of file scrollview.h.

#define SVM_ADDITEM   0xF300

Adds an item in the scrollview.

1 SVM_ADDITEM
2 SVITEMINFO svii;
3 HSVITEM *phsvi;
4 
5 wParam = (WPARAM)phsvi;
6 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 276 of file scrollview.h.

#define SVM_CHOOSEITEM   0xF321

Makes an item selected and visible in the scrollview item.

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

Definition at line 742 of file scrollview.h.

#define SVM_DELITEM   0xF301

Deletes an item from the scrollview.

1 SVM_DELITEM
2 int nItem;
3 HSVITEM hsvi;
4 
5 wParam = (WPARAM)nItem;
6 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 297 of file scrollview.h.

#define SVM_GETBOTTOMMARGIN   0xF315

Gets the bottom margin value of the scrollview.

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

Definition at line 532 of file scrollview.h.

#define SVM_GETCONTENTX   0xF31b

Gets the content x offset in the viewport.

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

Definition at line 629 of file scrollview.h.

#define SVM_GETCONTENTY   0xF31c

Gets the content y offset in the viewport.

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

Definition at line 644 of file scrollview.h.

#define SVM_GETCONTHEIGHT   0xF319

Gets the height of the content area.

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

Definition at line 592 of file scrollview.h.

#define SVM_GETCONTWIDTH   0xF318

Gets the width of the content area.

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

Definition at line 577 of file scrollview.h.

#define SVM_GETCTRL   0xF308

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

1 SVM_GETCTRL
2 int id;
3 
4 wParam = (WPARAM)id;
5 lParam = 0;
Parameters
idControl id.
Returns
Control window handle on success; otherwise 0.

Definition at line 396 of file scrollview.h.

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

1 SVM_GETCURSEL
2 
3 wParam = 0;
4 lParam = 0;
Returns
Index of current hilighted item.

Definition at line 683 of file scrollview.h.

#define SVM_GETFIRSTVISIBLEITEM   0xF337

Gets the index of the first visible item.

1 SVM_GETFIRSTVISIBLEITEM
Returns
Item index.

Definition at line 1088 of file scrollview.h.

#define SVM_GETFOCUSCHILD   0xF32a

Gets the focus control in the scrollview.

1 SVM_GETFOCUSCHILD
2 
3 wParam = 0;
4 lParam = 0;
Returns
Handle of the focus control.

Definition at line 872 of file scrollview.h.

#define SVM_GETHSCROLLPAGEVAL   0xF32d

Gets the horizontal page scroll value.

1 SVM_GETHSCROLLPAGEVAL
2 
3 wParam = 0;
4 lParam = 0;
Returns
Current horizontal page scroll value.

Definition at line 917 of file scrollview.h.

#define SVM_GETHSCROLLVAL   0xF32b

Gets the horizontal scroll value.

1 SVM_GETHSCROLLVAL
2 
3 wParam = 0;
4 lParam = 0;
Returns
Current horizontal scroll value.

Definition at line 887 of file scrollview.h.

#define SVM_GETITEMADDDATA   0xF333

Gets the additional data of the item.

1 SVM_GETITEMADDDATA
2 int nItem;
3 HSVITEM hsvi;
4 
5 wParam = (WPARAM)nItem;
6 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 1016 of file scrollview.h.

#define SVM_GETITEMCOUNT   0xF332

Gets the total number of the items.

Returns
Number of the items.

Definition at line 995 of file scrollview.h.

#define SVM_GETLEFTMARGIN   0xF312

Gets the left margin value of the scrollview.

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

Definition at line 487 of file scrollview.h.

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

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

Definition at line 451 of file scrollview.h.

#define SVM_GETRIGHTMARGIN   0xF314

Gets the right margin value of the scrollview.

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

Definition at line 517 of file scrollview.h.

#define SVM_GETTOPMARGIN   0xF313

Gets the top margin value of the scrollview.

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

Definition at line 502 of file scrollview.h.

#define SVM_GETVISIBLEHEIGHT   0xF317

Gets the height of the visible content area.

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

Definition at line 562 of file scrollview.h.

#define SVM_GETVISIBLEWIDTH   0xF316

Gets the width of the visible content area.

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

Definition at line 547 of file scrollview.h.

#define SVM_GETVSCROLLPAGEVAL   0xF32e

Gets the vertical page scroll value.

1 SVM_GETVSCROLLPAGEVAL
2 
3 wParam = 0;
4 lParam = 0;
Returns
Current vertical page scroll value.

Definition at line 932 of file scrollview.h.

#define SVM_GETVSCROLLVAL   0xF32c

Gets the vertical scroll value.

1 SVM_GETVSCROLLVAL
2 
3 wParam = 0;
4 lParam = 0;
Returns
Current vertical scroll value.

Definition at line 902 of file scrollview.h.

#define SVM_MAKEPOSVISIBLE   0xF328

Makes a position in the content area visible.

1 SVM_MAKEPOSVISIBLE
2 int pos_x, pos_y;
3 
4 wParam = (WPARAM)pos_x;
5 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 839 of file scrollview.h.

#define SVM_REFRESHITEM   0xF335

Refresh the item.

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

Definition at line 1056 of file scrollview.h.

#define SVM_RESETCONTENT   0xF309

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

1 SVM_RESETCONTENT
2 
3 wParam = 0;
4 lParam = 0;
Returns
Zero on success; otherwise -1.

Definition at line 411 of file scrollview.h.

#define SVM_SELECTITEM   0xF31f

Selects or unselects an item in the scrollview item.

1 SVM_SELECTITEM
2 int nItem;
3 
4 wParam = (WPARAM)nItem;
5 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 702 of file scrollview.h.

#define SVM_SETCONTAINERPROC   0xF329

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

1 SVM_SETCONTAINERPROC
2 WNDPROC pfn;
3 
4 wParam = 0;
5 lParam = (LPARAM)pfn;
Parameters
pfnNew container procedure function.
Returns
Old container procedure.

Definition at line 857 of file scrollview.h.

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

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

Definition at line 378 of file scrollview.h.

#define SVM_SETCONTPOS   0xF31d

Sets the content offset position in the viewport.

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

Definition at line 663 of file scrollview.h.

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

1 SVM_SETCONTRANGE
2 int cont_w, cont_h;
3 
4 wParam = (WPARAM)cont_w;
5 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 614 of file scrollview.h.

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

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

Definition at line 358 of file scrollview.h.

#define SVM_SETCURSEL   0xF322

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

1 SVM_SETCURSEL
2 int nItem;
3 BOOL bVisible;
4 
5 wParam = (WPARAM)nItem;
6 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 762 of file scrollview.h.

#define SVM_SETITEMADDDATA   0xF334

Sets the additional data of the item.

1 SVM_SETITEMADDDATA
2 int nitem;
3 int addData;
4 
5 wParam = (WPARAM)nitem;
6 lParam = (LPARAM)addData;
Parameters
nitemItem index.
addDataAdditional data
Returns
Old item additional data.

Definition at line 1036 of file scrollview.h.

#define SVM_SETITEMCMP   0xF327

Sets the item compare function.

1 SVM_SETITEMCMP
2 SVITEM_CMP *pfn;
3 
4 wParam = 0;
5 lParam = (LPARAM)pfn;
Parameters
pfnNew item compare function
Returns
Old function on success; otherwise NULL.

Definition at line 822 of file scrollview.h.

#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

1 SVM_SETITEMDESTROY
2 SVITEM_DESTROYFUNC *pfn;
3 
4 wParam = 0;
5 lParam = (LPARAM)pfn;
Parameters
pfnItem destroy operation function
Returns
Old function on success; otherwise NULL.

Definition at line 804 of file scrollview.h.

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

1 SVM_SETITEMDRAW
2 SVITEM_DRAWFUNC pfn;
3 
4 wParam = 0;
5 lParam = (LPARAM)pfn;
Parameters
pfnScrollview item drawing function.
Returns
Old drawing function pointer; otherwise 0.

Definition at line 318 of file scrollview.h.

#define SVM_SETITEMHEIGHT   0xF336

Sets the height of an item.

1 SVM_SETITEMHEIGHT
2 int nitem;
3 int height;
4 
5 wParam = (WPARAM)nitem;
6 lParam = (LPARAM)height;
Parameters
nitemItem index.
heightNew height of the item
Returns
Old item height.

Definition at line 1076 of file scrollview.h.

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

1 SVM_SETITEMINIT
2 SVITEM_INITFUNC *pfn;
3 
4 wParam = 0;
5 lParam = (LPARAM)pfn;
Parameters
pfnItem init operation function
Returns
Old function on success; otherwise NULL.

Definition at line 783 of file scrollview.h.

#define SVM_SETITEMOPS   0xF30a

Sets the item operations of the items in the scrollview.

Normally item operations should be set before adding items.

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

Definition at line 431 of file scrollview.h.

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

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

Definition at line 472 of file scrollview.h.

#define SVM_SETSCROLLPAGEVAL   0xF330

Sets the horizontal and vertical page value.

1 SVM_SETSCROLLPAGEVAL
2 int hval, vval;
3 
4 wParam = (WPARAM)hval;
5 lParam = (WPARAM)vval;
Parameters
hvalNew horizontal page value.
vvalNew vertical page value.
Returns
Zero.

Definition at line 970 of file scrollview.h.

#define SVM_SETSCROLLVAL   0xF32f

Sets the horizontal and vertical scroll value.

1 SVM_SETSCROLLVAL
2 int hval, vval;
3 
4 wParam = (WPARAM)hval;
5 lParam = (LPARAM)vval;
Parameters
hvalNew horizontal scroll value.
vvalNew vertical scroll value.
Returns
Zero.

Definition at line 951 of file scrollview.h.

#define SVM_SHOWITEM   0xF320

Makes an item visible in the scrollview item.

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

Definition at line 722 of file scrollview.h.

#define SVM_SORTITEMS   0xF331

Sorts the items according to a specified comparision function.

1 SVM_SORTITEMS
2 SVITEM_CMP pfn;
3 
4 lParam = pfn;
Parameters
pfnComparision function.
Returns
Zero.

Definition at line 987 of file scrollview.h.