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

Macros

#define CB_GETEDITSEL   0xF140
 Get the starting and ending character positions of the current selection. More...
 
#define CB_LIMITTEXT   0xF141
 Limits the length of text in the edit control. More...
 
#define CB_SETEDITSEL   0xF142
 Set the starting and ending character positions of the current selection. More...
 
#define CB_ADDSTRING   0xF143
 Adds a string to the list box of a combo box. More...
 
#define CB_DELETESTRING   0xF144
 Deletes a string in the list box of a combo box. More...
 
#define CB_GETCOUNT   0xF146
 Retreives the number of items in the list box of a combo box. More...
 
#define CB_GETCURSEL   0xF147
 Retreives the index of the currently selected item in the list box. More...
 
#define CB_GETLBTEXT   0xF148
 Retreives the string of an item in the list box. More...
 
#define CB_GETLBTEXTLEN   0xF149
 Get the string length of an item in the list box. More...
 
#define CB_INSERTSTRING   0xF14A
 Inserts a string to the list box of a combo box. More...
 
#define CB_RESETCONTENT   0xF14B
 Removes all items from the list box and edit control. More...
 
#define CB_FINDSTRING   0xF14C
 Searchs the list box for an item beginning with the characters in a specified string. More...
 
#define CB_SETCURSEL   0xF14E
 Selects a string in the list of a combo box. More...
 
#define CB_GETITEMADDDATA   0xF150
 Retreives the application-supplied 32-bit value associated with the specified item. More...
 
#define CB_SETITEMADDDATA   0xF151
 Set a 32-bit data value with the specified item. More...
 
#define CB_GETDROPPEDCONTROLRECT   0xF152
 Retreives the screen coordinates of the dropdown list box of a combo box. More...
 
#define CB_SETITEMHEIGHT   0xF153
 Set the height of all items of the list box in a combo box. More...
 
#define CB_GETITEMHEIGHT   0xF154
 Get the height of items of the list box in a combo box. More...
 
#define CB_GETDROPPEDSTATE   0xF157
 Determine whether the list box of a combo box is dropped down. More...
 
#define CB_FINDSTRINGEXACT   0xF158
 Searchs the list box for an item that matches the specified string. More...
 
#define CB_SETSPINFORMAT   0xF162
 Set the format string of value for CBS_AUTOSPIN type. More...
 
#define CB_SETSPINRANGE   0xF163
 Determine the range of the spin box in a combo box. More...
 
#define CB_GETSPINRANGE   0xF164
 Get the range of the spin box in a combo box. More...
 
#define CB_SETSPINVALUE   0xF165
 Determine the value of the spin box in a combo box. More...
 
#define CB_GETSPINVALUE   0xF166
 Get the current value of the spin box in a combo box. More...
 
#define CB_SETSPINPACE   0xF167
 Determine the pace and the fast pace of the spin box in a combo box. More...
 
#define CB_GETSPINPACE   0xF168
 Get the pace and the fast pace of the spin box in a combo box. More...
 
#define CB_SPIN   0xF170
 Spins the value of the spin box or auto spin box. More...
 
#define CB_FASTSPIN   0xF171
 Fast spins the value of the spin box or auto spin box. More...
 
#define CB_SETSTRCMPFUNC   0xF172
 Set the STRCMP function used to sort items. More...
 
#define CB_GETCHILDREN   0xF173
 Get the handles to the children of a ComboBox control. More...
 

Detailed Description

Macro Definition Documentation

◆ CB_ADDSTRING

#define CB_ADDSTRING   0xF143

Adds a string to the list box of a combo box.

An application sends a CB_ADDSTRING message to add a string to the list box of a combo box.

char* string;
wParam = 0;
lParam = (LPARAM)string;
Parameters
stringPointer to the null-terminated string to be added.
Returns
The index of the new item on success, else the one of the following error codes:
  • CB_ERRSPACE No memory can be allocated for new item.
  • CB_ERR Invalid passed arguments.

Definition at line 333 of file combobox.h.

◆ CB_DELETESTRING

#define CB_DELETESTRING   0xF144

Deletes a string in the list box of a combo box.

An application sends a CB_DELETESTRING message to delete a string in the list box of a combo box.

int index;
wParam = (WPARAM)index;
lParam = 0;
Parameters
indexSpecifies the index of the string to delete.
Returns
If succeed, return zero; otherwise CB_ERR.

Definition at line 354 of file combobox.h.

◆ CB_FASTSPIN

#define CB_FASTSPIN   0xF171

Fast spins the value of the spin box or auto spin box.

int direct
wParam = (WPARAM)direct;
lParam = 0;
Parameters
directIndicats the direct of the spin. Zero means up, non-zero down.
Returns
Always be CB_OKAY.

Definition at line 855 of file combobox.h.

◆ CB_FINDSTRING

#define CB_FINDSTRING   0xF14C

Searchs the list box for an item beginning with the characters in a specified string.

An application sends a CB_FINDSTRING message to search the list box for an item beginning with the characters in a specified string.

int indexStart;
char* string;
wParam = (WPARAM)indexStart;
lParam = (LPARAM)string;
Parameters
indexStartIndex of the item preceding the first item to be searched.
stringPointer to the null-terminated string that contains the prefix to search for.
Returns
The index of the matching item or CB_ERR to indicate not found.

Definition at line 510 of file combobox.h.

◆ CB_FINDSTRINGEXACT

#define CB_FINDSTRINGEXACT   0xF158

Searchs the list box for an item that matches the specified string.

An application sends a CB_FINDSTRINGEXACT message to search the list box for an item that matches a specified string.

int indexStart;
char* string;
wParam = (WPARAM)indexStart;
lParam = (LPARAM)string;
Parameters
indexStartIndex of the item preceding the first item to be searched.
stringPointer to the null-terminated string to search for.
Returns
The index of the matching item; otherwise CB_ERR to indicate not found.

Definition at line 675 of file combobox.h.

◆ CB_GETCHILDREN

#define CB_GETCHILDREN   0xF173

Get the handles to the children of a ComboBox control.

An application sends a CB_GETCHILDREN message to get the handles to the children of a ComboBox control.

HWND *wnd_edit, *wnd_listbox;
wParam = (WPARAM)wnd_edit;
lParam = (LPARAM)wnd_listbox;
Parameters
wnd_editThe buffer saving the handle to the edit box of the ComboBox control.
wnd_listThe buffer saving the handle to the list box of the ComboBox control. If the ComboBox have type of CBS_AUTOSPIN, handle to the list box will be 0.
Returns
Always be CB_OKAY.

Definition at line 912 of file combobox.h.

◆ CB_GETCOUNT

#define CB_GETCOUNT   0xF146

Retreives the number of items in the list box of a combo box.

An application sends a CB_GETCOUNT message to retreive the number of items in the list box of a combo box.

wParam = 0;
lParam = 0;
Returns
The number of items in the list box.

Definition at line 374 of file combobox.h.

◆ CB_GETCURSEL

#define CB_GETCURSEL   0xF147

Retreives the index of the currently selected item in the list box.

An application sends a CB_GETCURSEL message to retreive the index of the currently selected item in the list box of a combo box.

wParam = 0;
lParam = 0;
Returns
The index of currently selected item in the list box if have one; otherwise CB_ERR.

Definition at line 393 of file combobox.h.

◆ CB_GETDROPPEDCONTROLRECT

#define CB_GETDROPPEDCONTROLRECT   0xF152

Retreives the screen coordinates of the dropdown list box of a combo box.

RECT *rect;
wParam = 0;
lParam = (LPARAM)rect;
Parameters
rectPointer to the RECT structure used to save the coordinates.

Definition at line 597 of file combobox.h.

◆ CB_GETDROPPEDSTATE

#define CB_GETDROPPEDSTATE   0xF157

Determine whether the list box of a combo box is dropped down.

CB_GETIDROPSTATE
wParam = 0;
lParam = 0;
Returns
If the list box is visible, the return value is TRUE; otherwise, it is FALSE.

Definition at line 652 of file combobox.h.

◆ CB_GETEDITSEL

#define CB_GETEDITSEL   0xF140

Get the starting and ending character positions of the current selection.

An application sends a CB_GETEDITSEL message to get the starting and ending character positions of the current selection in the edit control of a combo box.

int start;
int end;
wParam = (WPARAM)&start;
lParam = (LPARAM)&end;
Parameters
startPointer to a 32-bit value that receives the starting position of the selection.
endPointer to a 32-bit value that receives the ending position of the selection.
Note
Not implemented yet.

Definition at line 263 of file combobox.h.

◆ CB_GETITEMADDDATA

#define CB_GETITEMADDDATA   0xF150

Retreives the application-supplied 32-bit value associated with the specified item.

An application sends an CB_GETITEMADDDATA message to retrive the 32-bit data value associated with with an item in the list box of the combo box.

int index;
wParam = (WPARAM)index;
lParam = 0;
Parameters
indexThe index of the item.
Returns
The 32-bit data value associated with an item on success, otherwise CB_ERR to indicate an error.

Definition at line 555 of file combobox.h.

◆ CB_GETITEMHEIGHT

#define CB_GETITEMHEIGHT   0xF154

Get the height of items of the list box in a combo box.

wParam = 0;
lParam = 0;
Returns
The height of item in the list box.

Definition at line 633 of file combobox.h.

◆ CB_GETLBTEXT

#define CB_GETLBTEXT   0xF148

Retreives the string of an item in the list box.

An application sends a CB_GETLBTEXT message to retreive the string of a specified item in the list box of a combo box.

int index;
char* string;
wParam = (WPARAM)index;
lParam = (LPARAM)string;
Parameters
indexThe index of the selected item.
stringPointer to the string buffer.
Returns
One of the following values:
  • CB_OKAY
    Success.
  • CB_ERR
    Invalid item index.

Definition at line 418 of file combobox.h.

◆ CB_GETLBTEXTLEN

#define CB_GETLBTEXTLEN   0xF149

Get the string length of an item in the list box.

An application sends a CB_GETLBTEXTLEN message to get the string length of a specified item in the list box of a combo box.

int index;
wParam = (WPARAM)index;
lParam = 0;
Parameters
indexThe index of the specified item.
Returns
The length of the string on success; otherwise CB_ERR.

Definition at line 439 of file combobox.h.

◆ CB_GETSPINPACE

#define CB_GETSPINPACE   0xF168

Get the pace and the fast pace of the spin box in a combo box.

int *spin_pace;
int *spin_fastpace;
wParam = (WPARAM)spin_pace;
lParam = (LPARAM)spin_fastpace;
Parameters
spin_pacePointer to the data to retreive the new pace value of the spin box.
spin_fastpacePointer to the data to retreive the new fast pace value of the spin box.
Returns
Always be CB_OKAY.

Definition at line 817 of file combobox.h.

◆ CB_GETSPINRANGE

#define CB_GETSPINRANGE   0xF164

Get the range of the spin box in a combo box.

int *spin_min;
int *spin_max;
wParam = (WPARAM)spin_min;
lParam = (LPARAM)spin_max;
Parameters
spin_minThe minimum value of the spin box.
spin_maxThe maximum value of the spin box.
Returns
Always be CB_OKAY.

Definition at line 744 of file combobox.h.

◆ CB_GETSPINVALUE

#define CB_GETSPINVALUE   0xF166

Get the current value of the spin box in a combo box.

wParam = 0;
lParam = 0;
Returns
The current value of the spin box.

Definition at line 777 of file combobox.h.

◆ CB_INSERTSTRING

#define CB_INSERTSTRING   0xF14A

Inserts a string to the list box of a combo box.

An application sends a CB_INSERTSTRING message to insert a string to the list box of a combo box. Unlike the CB_ADDSTRING message, the CB_INSERTSTRING message do not cause a list to be sorted.

int index;
char* string;
wParam = (WPARAM)index;
lParam = (LPARAM)string;
Parameters
indexThe index of the position at which to insert the string.
stringPointer to the null-terminated string to be added.
Returns
The index of the new item on success, else the one of the following error codes:
  • CB_ERRSPACE No memory can be allocated for new item.
  • CB_ERR Invalid passed arguments.

Definition at line 467 of file combobox.h.

◆ CB_LIMITTEXT

#define CB_LIMITTEXT   0xF141

Limits the length of text in the edit control.

An application sends a CB_LIMITTEXT message to limit the length of the text the user may type into the edit control of a combo box.

int newLimit;
wParam = (WPARAM)newLimit;
lParam = 0;
Parameters
newLimitSpecifies the maximum number of characters the user can enter.
Returns
The return value is always zero.

Definition at line 284 of file combobox.h.

◆ CB_RESETCONTENT

#define CB_RESETCONTENT   0xF14B

Removes all items from the list box and edit control.

An application sends a CB_RESETCONTENT message remove all items from the list box and edit control of a combo box.

wParam = 0;
lParam = 0;
Returns
Always be zero.

Definition at line 485 of file combobox.h.

◆ CB_SETCURSEL

#define CB_SETCURSEL   0xF14E

Selects a string in the list of a combo box.

CB_SETCURLSEL
int index;
wParam = (WPARAM)index;
lParam = 0;
Parameters
indexThe index of the string to select.
Returns
CB_OKAY on success; otherwise CB_ERR to indicate an invalid index.

Definition at line 530 of file combobox.h.

◆ CB_SETEDITSEL

#define CB_SETEDITSEL   0xF142

Set the starting and ending character positions of the current selection.

An application sends a CB_SETEDITSEL message to set the starting and ending character positions of the current selection in the edit control of a combo box.

int start;
int end;
wParam = (WPARAM)start;
lParam = (LPARAM)end;
Parameters
startThe starting position of the selection.
endThe ending position of the selection.
Note
Not implemented yet.

Definition at line 308 of file combobox.h.

◆ CB_SETITEMADDDATA

#define CB_SETITEMADDDATA   0xF151

Set a 32-bit data value with the specified item.

An application sends an CB_SETITEMADDDATA message to associate a 32-bit data value specified in the lParam parameter with an item in the list box that is specified in the wParam parameter.

int index;
DWORD addData;
wParam = (WPARAM)index;
lParam = (LPARAM)addData;
Parameters
indexThe index of the specified item.
addDatathe 32-bit data value which will associated with the item.
Returns
One of the following values:
  • CB_OKAY
    Success
  • CB_ERR
    Invalid item index

Definition at line 581 of file combobox.h.

◆ CB_SETITEMHEIGHT

#define CB_SETITEMHEIGHT   0xF153

Set the height of all items of the list box in a combo box.

An application sends an CB_SETITEMHEIGHT message to set the height of all items of the list box in a combo box.

int itemHeight;
wParam = 0;
lParam = (LPARAM)itemHeight;
Parameters
itemHeightNew height of item of the list box.
Returns
The effective height of item of the list box.

Definition at line 618 of file combobox.h.

◆ CB_SETSPINFORMAT

#define CB_SETSPINFORMAT   0xF162

Set the format string of value for CBS_AUTOSPIN type.

const char* format;
wParam = 0;
lParam = (LPARAM)format;
Parameters
formatA format string can be used by sprintf function to format an interger.
Returns
CB_OKAY on success; otherwise CB_ERR.

Definition at line 704 of file combobox.h.

◆ CB_SETSPINPACE

#define CB_SETSPINPACE   0xF167

Determine the pace and the fast pace of the spin box in a combo box.

int new_pace;
int new_fastpace;
wParam = (WPARAM)new_pace;
lParam = (LPARAM)new_fastpace;
Parameters
new_paceThe new pace value of the spin box.
new_fastpaceThe new fast pace value of the spin box.
Returns
Always be CB_OKAY.

Definition at line 797 of file combobox.h.

◆ CB_SETSPINRANGE

#define CB_SETSPINRANGE   0xF163

Determine the range of the spin box in a combo box.

int new_min;
int new_max;
wParam = (WPARAM)new_min;
lParam = (LPARAM)new_max;
Parameters
new_minThe new minimum value of the spin box.
new_maxThe new maximum value of the spin box.
Returns
CB_OKAY on success; otherwise CB_ERR to indicate invalid parameters.

Definition at line 724 of file combobox.h.

◆ CB_SETSPINVALUE

#define CB_SETSPINVALUE   0xF165

Determine the value of the spin box in a combo box.

int new_value;
wParam = (WPARAM)new_value;
lParam = 0;
Parameters
new_valueThe new value of the spin box.
Returns
CB_OKAY on success; otherwise CB_ERR to indicate invalid parameters.

Definition at line 762 of file combobox.h.

◆ CB_SETSTRCMPFUNC

#define CB_SETSTRCMPFUNC   0xF172

Set the STRCMP function used to sort items.

An application sends a CB_SETSTRCMPFUNC message to set a new STRCMP function to sort items in the combo-box.

Note that you should send this message before adding any item to the combo-box control.

static int my_strcmp (const char* s1, const char* s2, size_t n)
{
...
return 0;
}
wParam = 0;
lParam = (LPARAM) my_strcmp;
Parameters
my_strcmpYour own function to compare two strings.
Returns
One of the following values:
  • CB_OKAY
    Success
  • CB_ERR
    This combobox has no list box or it is not an empty list box.

Definition at line 888 of file combobox.h.

◆ CB_SPIN

#define CB_SPIN   0xF170

Spins the value of the spin box or auto spin box.

int direct;
wParam = (WPARAM)direct;
lParam = 0;
Parameters
directIndicats the direct of the spin. Zero means up, non-zero down.
Returns
Always be CB_OKAY.

Definition at line 836 of file combobox.h.

CB_SETSPINPACE
#define CB_SETSPINPACE
Determine the pace and the fast pace of the spin box in a combo box.
Definition: combobox.h:797
DWORD
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:604
CB_INSERTSTRING
#define CB_INSERTSTRING
Inserts a string to the list box of a combo box.
Definition: combobox.h:467
HWND
GHANDLE HWND
Handle to main window or control.
Definition: common.h:407
CB_GETCOUNT
#define CB_GETCOUNT
Retreives the number of items in the list box of a combo box.
Definition: combobox.h:374
CB_GETITEMHEIGHT
#define CB_GETITEMHEIGHT
Get the height of items of the list box in a combo box.
Definition: combobox.h:633
CB_GETCHILDREN
#define CB_GETCHILDREN
Get the handles to the children of a ComboBox control.
Definition: combobox.h:912
CB_GETLBTEXTLEN
#define CB_GETLBTEXTLEN
Get the string length of an item in the list box.
Definition: combobox.h:439
CB_SETITEMHEIGHT
#define CB_SETITEMHEIGHT
Set the height of all items of the list box in a combo box.
Definition: combobox.h:618
CB_RESETCONTENT
#define CB_RESETCONTENT
Removes all items from the list box and edit control.
Definition: combobox.h:485
WPARAM
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:706
_RECT
Definition: common.h:936
CB_SETSPINFORMAT
#define CB_SETSPINFORMAT
Set the format string of value for CBS_AUTOSPIN type.
Definition: combobox.h:704
CB_GETSPINVALUE
#define CB_GETSPINVALUE
Get the current value of the spin box in a combo box.
Definition: combobox.h:777
CB_SPIN
#define CB_SPIN
Spins the value of the spin box or auto spin box.
Definition: combobox.h:836
CB_DELETESTRING
#define CB_DELETESTRING
Deletes a string in the list box of a combo box.
Definition: combobox.h:354
CB_FASTSPIN
#define CB_FASTSPIN
Fast spins the value of the spin box or auto spin box.
Definition: combobox.h:855
CB_SETSPINRANGE
#define CB_SETSPINRANGE
Determine the range of the spin box in a combo box.
Definition: combobox.h:724
CB_GETCURSEL
#define CB_GETCURSEL
Retreives the index of the currently selected item in the list box.
Definition: combobox.h:393
CB_GETITEMADDDATA
#define CB_GETITEMADDDATA
Retreives the application-supplied 32-bit value associated with the specified item.
Definition: combobox.h:555
CB_GETSPINRANGE
#define CB_GETSPINRANGE
Get the range of the spin box in a combo box.
Definition: combobox.h:744
CB_GETLBTEXT
#define CB_GETLBTEXT
Retreives the string of an item in the list box.
Definition: combobox.h:418
CB_FINDSTRING
#define CB_FINDSTRING
Searchs the list box for an item beginning with the characters in a specified string.
Definition: combobox.h:510
CB_GETDROPPEDCONTROLRECT
#define CB_GETDROPPEDCONTROLRECT
Retreives the screen coordinates of the dropdown list box of a combo box.
Definition: combobox.h:597
CB_GETEDITSEL
#define CB_GETEDITSEL
Get the starting and ending character positions of the current selection.
Definition: combobox.h:263
CB_LIMITTEXT
#define CB_LIMITTEXT
Limits the length of text in the edit control.
Definition: combobox.h:284
CB_SETITEMADDDATA
#define CB_SETITEMADDDATA
Set a 32-bit data value with the specified item.
Definition: combobox.h:581
CB_SETSTRCMPFUNC
#define CB_SETSTRCMPFUNC
Set the STRCMP function used to sort items.
Definition: combobox.h:888
CB_ADDSTRING
#define CB_ADDSTRING
Adds a string to the list box of a combo box.
Definition: combobox.h:333
CB_SETSPINVALUE
#define CB_SETSPINVALUE
Determine the value of the spin box in a combo box.
Definition: combobox.h:762
CB_FINDSTRINGEXACT
#define CB_FINDSTRINGEXACT
Searchs the list box for an item that matches the specified string.
Definition: combobox.h:675
LPARAM
UINT_PTR LPARAM
A type definition for the second message paramter.
Definition: common.h:712
CB_GETSPINPACE
#define CB_GETSPINPACE
Get the pace and the fast pace of the spin box in a combo box.
Definition: combobox.h:817
CB_SETEDITSEL
#define CB_SETEDITSEL
Set the starting and ending character positions of the current selection.
Definition: combobox.h:308