Messages of combobox control
[ComboBox control]

Defines


Define Documentation

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

 CB_ADDSTRING
 char* string;

 wParam = 0;
 lParam = (LPARAM)string;
Parameters:
string Pointer 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 300 of file combobox.h.

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

 CB_DELETESTRING
 int index;

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

Definition at line 321 of file combobox.h.

#define CB_FASTSPIN   0xF171

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

 CB_FASTSPIN

 int direct

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

Definition at line 822 of file combobox.h.

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

 CB_FINDSTRING
 int indexStart;
 char* string;

 wParam = (WPARAM)indexStart;
 lParam = (LPARAM)string;
Parameters:
indexStart Index of the item preceding the first item to be searched.
string Pointer 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 477 of file combobox.h.

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

 CB_FINDSTRINGEXACT
 int indexStart;
 char* string;

 wParam = (WPARAM)indexStart;
 lParam = (LPARAM)string;
Parameters:
indexStart Index of the item preceding the first item to be searched.
string Pointer 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 642 of file combobox.h.

#define CB_GETCHILDREN   0xF173

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

 CB_GETCHILDREN

 HWND *wnd_edit, *wnd_listbox;

 wParam = (WPARAM)wnd_edit;
 lParam = (LPARAM)wnd_listbox;
Parameters:
wnd_edit The buffer saving the handle to the edit box of the ComboBox control.
wnd_list The 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 879 of file combobox.h.

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

 CB_GETCOUNT

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

Definition at line 341 of file combobox.h.

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

 CB_GETCURSEL

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

Definition at line 360 of file combobox.h.

#define CB_GETDROPPEDCONTROLRECT   0xF152

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

 CB_GETDROPPEDCONTROLRECT
 RECT *rect;

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

Definition at line 564 of file combobox.h.

#define CB_GETDROPPEDSTATE   0xF157

Determines 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 619 of file combobox.h.

#define CB_GETEDITSEL   0xF140

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

 CB_GETEDITSEL
 int start;
 int end;

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

Definition at line 230 of file combobox.h.

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

 CB_GETITEMADDDATA
 int index;

 wParam = (WPARAM)index;
 lParam = 0;
Parameters:
index The 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 522 of file combobox.h.

#define CB_GETITEMHEIGHT   0xF154

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

 CB_GETITEMHEIGHT

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

Definition at line 600 of file combobox.h.

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

 CB_GETLBTEXT
 int index;
 char* string;

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

Definition at line 385 of file combobox.h.

#define CB_GETLBTEXTLEN   0xF149

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

 CB_GETLBTEXTLEN
 int index;

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

Definition at line 406 of file combobox.h.

#define CB_GETSPINPACE   0xF168

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

 CB_GETSPINPACE
 int *spin_pace;
 int *spin_fastpace;

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

Definition at line 784 of file combobox.h.

#define CB_GETSPINRANGE   0xF164

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

 CB_GETSPINRANGE
 int *spin_min;
 int *spin_max;

 wParam = (WPARAM)spin_min;
 lParam = (LPARAM)spin_max;
Parameters:
spin_min The minimum value of the spin box.
spin_max The maximum value of the spin box.
Returns:
Always be CB_OKAY.

Definition at line 711 of file combobox.h.

#define CB_GETSPINVALUE   0xF166

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

 CB_GETSPINVALUE

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

Definition at line 744 of file combobox.h.

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

 CB_INSERTSTRING
 int index;
 char* string;

 wParam = (WPARAM)index;
 lParam = (LPARAM)string;
Parameters:
index The index of the position at which to insert the string.
string Pointer 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 434 of file combobox.h.

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

 CB_LIMITTEXT
 int newLimit;

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

Definition at line 251 of file combobox.h.

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

 CB_RESETCONTENT

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

Definition at line 452 of file combobox.h.

#define CB_SETCURSEL   0xF14E

Selects a string in the list of a combo box.

 CB_SETCURLSEL
 int index;

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

Definition at line 497 of file combobox.h.

#define CB_SETEDITSEL   0xF142

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

 CB_SETEDITSEL
 int start;
 int end;

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

Definition at line 275 of file combobox.h.

#define CB_SETITEMADDDATA   0xF151

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

 CB_SETITEMADDDATA
 int index;
 DWORD addData;

 wParam = (WPARAM)index;
 lParam = (LPARAM)addData;
Parameters:
index The index of the specified item.
addData the 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 548 of file combobox.h.

#define CB_SETITEMHEIGHT   0xF153

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

 CB_SETITEMHEIGHT
 int itemHeight;

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

Definition at line 585 of file combobox.h.

#define CB_SETSPINFORMAT   0xF162

Sets the format string of value for CBS_AUTOSPIN type.

 CB_SETSPINFORMAT
 const char* format;

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

Definition at line 671 of file combobox.h.

#define CB_SETSPINPACE   0xF167

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

 CB_SETSPINPACE
 int new_pace;
 int new_fastpace;

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

Definition at line 764 of file combobox.h.

#define CB_SETSPINRANGE   0xF163

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

 CB_SETSPINRANGE
 int new_min;
 int new_max;

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

Definition at line 691 of file combobox.h.

#define CB_SETSPINVALUE   0xF165

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

 CB_SETSPINVALUE
 int new_value;

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

Definition at line 729 of file combobox.h.

#define CB_SETSTRCMPFUNC   0xF172

Sets 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;
 }

 CB_SETSTRCMPFUNC

 wParam = 0;
 lParam = (LPARAM) my_strcmp;
Parameters:
my_strcmp Your 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 855 of file combobox.h.

#define CB_SPIN   0xF170

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

 CB_SPIN

 int direct;

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

Definition at line 803 of file combobox.h.

Generated on Thu Apr 7 15:58:35 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3