#define MBM_ADDITEM 0xF200 |
Sends to the control to add an item to the menu list.
MBM_ADDITEM int pos; MENUBUTTONITEM newitem; wParam = (WPARAM)pos; lParam = (LPARAM)&newitem;
pos | The position at which to add the item. If the control was created with the style of MBS_SORT, this parameter will be ignored. If this parameter is less than 0, the new item will be append to the tail of the menu list. | |
newitem | Pointer to the menubutton item info structure. |
Definition at line 181 of file menubutton.h.
#define MBM_DELITEM 0xF201 |
Sends to the control to delete an item in the menu list.
MBM_DELETEITEM int del; wParam = (WPARAM)del; lParam = 0;
del | The index of the item to be deleted. |
Definition at line 199 of file menubutton.h.
#define MBM_GETCURITEM 0xF206 |
Sends to get the index of the current selected item.
MBM_GETCURITEM wParam = 0; lParam = 0;
Definition at line 275 of file menubutton.h.
#define MBM_GETITEMDATA 0xF204 |
Sends to the control to retrive the data of a specific item.
MBM_GETITEMDATA int index; PMENUBUTTONITEM pmbi; wParam = (WPARAM)index; lParam = (LPARAM)pmbi;
index | The index of the specific item. | |
pmbi | Pointer to the MENUBUTTONITEM structure for storing the menubutton item data. |
Definition at line 259 of file menubutton.h.
#define MBM_RESETCTRL 0xF202 |
Sends to the control to remove all items in the menu list.
MBM_RESETCTRL wParam = 0; lParam = 0;
Definition at line 214 of file menubutton.h.
#define MBM_SETCURITEM 0xF207 |
Sends to set the current selected item based on index.
MBM_SETCURITEM int cur; wParam = (WPARAM)cur; lParam = 0;
cur | The index to be the current item. |
Definition at line 293 of file menubutton.h.
#define MBM_SETITEMDATA 0xF203 |
Sends to the control to set the data of a specific item.
MBM_SETITEMDATA int index; PMENUBUTTONITEM pmbi; wParam = (WPARAM)index; lParam = (LPARAM)pmbi;
index | The index of the item to be altered. | |
pmbi | Pointer to the MENUBUTTONITEM structure that stores the new menubutton item data. |
Definition at line 238 of file menubutton.h.
#define MBM_SETSTRCMPFUNC 0xF208 |
Sets the STRCMP function used to sort items.
An application sends a MBM_SETSTRCMPFUNC message to set a new STRCMP function to sort items in the menubutton.
Note that you should send this message before adding any item to the menubutton control.
static int my_strcmp (const char* s1, const char* s2, size_t n) { ... return 0; } MBM_SETSTRCMPFUNC wParam = 0; lParam = (LPARAM) my_strcmp;
my_strcmp | Your own function to compare two strings. |
Definition at line 324 of file menubutton.h.