⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 combobox.h

📁 有了操作系统、TCP/IP协议栈、文件系统
💻 H
📖 第 1 页 / 共 2 页
字号:
 * \endcode * * \param index The index of the string to select.  * * \return CB_OKAY on success; otherwise CB_ERR to indicate an invalid index. */#define CB_SETCURSEL                0xF14E#define CB_SHOWDROPDOWN             0xF14F/** * \def CB_GETITEMADDDATA * \brief 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. * * \code * CB_GETITEMADDDATA * int index; * * wParam = (WPARAM)index; * lParam = 0; * \endcode * * \param index The index of the item. * * \return The 32-bit data value associated with an item on success, otherwise *         CB_ERR to indicate an error. */#define CB_GETITEMADDDATA           0xF150/** * \def CB_SETITEMADDDATA * \brief 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. * * \code * CB_SETITEMADDDATA * int index; * DWORD addData; * * wParam = (WPARAM)index; * lParam = (LPARAM)addData; * \endcode * * \param index The index of the specified item. * \param addData the 32-bit data value which will associated with the item. * * \return One of the following values: *          - CB_OKAY\n         Success *          - CB_ERR\n          Invalid item index */#define CB_SETITEMADDDATA              0xF151/** * \def CB_GETDROPPEDCONTROLRECT * \brief Retreives the screen coordinates of the dropdown list box of a combo box.  * * \code * CB_GETDROPPEDCONTROLRECT * RECT *rect; * * wParam = 0; * lParam = (LPARAM)rect; * \endcode * * \param rect Pointer to the RECT structure used to save the coordinates. */#define CB_GETDROPPEDCONTROLRECT    0xF152/** * \def CB_SETITEMHEIGHT * \brief 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. * * \code * CB_SETITEMHEIGHT * int itemHeight; * * wParam = 0; * lParam = (LPARAM)itemHeight; * \endcode * * \param itemHeight New height of item of the list box. * * \return The effective height of item of the list box. */#define CB_SETITEMHEIGHT            0xF153/** * \def CB_GETITEMHEIGHT * \brief Gets the height of items of the list box in a combo box. * * \code * CB_GETITEMHEIGHT * * wParam = 0; * lParam = 0; * \endcode * * \return The height of item in the list box. */#define CB_GETITEMHEIGHT            0xF154#define CB_SETEXTENDEDUI            0xF155#define CB_GETEXTENDEDUI            0xF156/** * \def CB_GETDROPPEDSTATE * \brief Determines whether the list box of a combo box is dropped down. * * \code * CB_GETIDROPSTATE * * wParam = 0; * lParam = 0; * \endcode * * \return If the list box is visible, the return value is TRUE;  *         otherwise, it is FALSE. */#define CB_GETDROPPEDSTATE          0xF157/** * \def CB_FINDSTRINGEXACT * \brief 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. * * \code * CB_FINDSTRINGEXACT * int indexStart; * char* string; * * wParam = (WPARAM)indexStart; * lParam = (LPARAM)string; * \endcode * * \param indexStart Index of the item preceding the first item to be searched. * \param string Pointer to the null-terminated string to search for. * * \return The index of the matching item; otherwise CB_ERR to indicate not found. */#define CB_FINDSTRINGEXACT          0xF158#define CB_SETLOCALE                0xF159#define CB_GETLOCALE                0xF15A#define CB_GETTOPINDEX              0xF15b#define CB_SETTOPINDEX              0xF15c#define CB_GETHORIZONTALEXTENT      0xF15d#define CB_SETHORIZONTALEXTENT      0xF15e#define CB_GETDROPPEDWIDTH          0xF15f#define CB_SETDROPPEDWIDTH          0xF160#define CB_INITSTORAGE              0xF161/** * \def CB_SETSPINFORMAT * \brief Sets the format string of value for CBS_AUTOSPIN type. * * \code * CB_SETSPINFORMAT * const char* format; * * wParam = 0; * lParam = (LPARAM)format; * \endcode * * \param format A format string can be used by \a sprintf function *        to format an interger. * * \return CB_OKAY on success; otherwise CB_ERR. */#define CB_SETSPINFORMAT             0xF162/** * \def CB_SETSPINRANGE * \brief Determines the range of the spin box in a combo box. * * \code * CB_SETSPINRANGE * int new_min; * int new_max; * * wParam = (WPARAM)new_min; * lParam = (LPARAM)new_max; * \endcode * * \param new_min The new minimum value of the spin box. * \param new_max The new maximum value of the spin box. * * \return CB_OKAY on success; otherwise CB_ERR to indicate invalid parameters. */#define CB_SETSPINRANGE             0xF163/** * \def CB_GETSPINRANGE * \brief Gets the range of the spin box in a combo box. * * \code * CB_GETSPINRANGE * int *spin_min; * int *spin_max; * * wParam = (WPARAM)spin_min; * lParam = (LPARAM)spin_max; * \endcode * * \param spin_min The minimum value of the spin box. * \param spin_max The maximum value of the spin box. * * \return Always be CB_OKAY. */#define CB_GETSPINRANGE             0xF164/** * \def CB_SETSPINVALUE * \brief Determines the value of the spin box in a combo box. * * \code * CB_SETSPINVALUE * int new_value; * * wParam = (WPARAM)new_value; * lParam = 0; * \endcode * * \param new_value The new value of the spin box. * * \return CB_OKAY on success; otherwise CB_ERR to indicate invalid parameters. */#define CB_SETSPINVALUE             0xF165/** * \def CB_GETSPINVALUE * \brief Gets the current value of the spin box in a combo box. * * \code * CB_GETSPINVALUE * * wParam = 0; * lParam = 0; * \endcode * * \return The current value of the spin box. */#define CB_GETSPINVALUE             0xF166/** * \def CB_SETSPINPACE * \brief Determines the pace and the fast pace of the spin box in a combo box. * * \code * CB_SETSPINPACE * int new_pace; * int new_fastpace; * * wParam = (WPARAM)new_pace; * lParam = (LPARAM)new_fastpace; * \endcode * * \param new_pace The new pace value of the spin box. * \param new_fastpace The new fast pace value of the spin box. * * \return Always be CB_OKAY. */#define CB_SETSPINPACE              0xF167/** * \def CB_GETSPINPACE * \brief Gets the pace and the fast pace of the spin box in a combo box. * * \code * CB_GETSPINPACE * int *spin_pace; * int *spin_fastpace; * * wParam = (WPARAM)spin_pace; * lParam = (LPARAM)spin_fastpace; * \endcode * * \param spin_pace Pointer to the data to retreive the new pace value of the spin box. * \param spin_fastpace Pointer to the data to retreive the new fast pace value of the spin box. * * \return Always be CB_OKAY. */#define CB_GETSPINPACE              0xF168/** * \def CB_SPIN * \brief Spins the value of the spin box or auto spin box. * * \code * CB_SPIN * * int direct; * * wParam = direct; * lParam = 0; * \endcode * * \param direct Indicats the direct of the spin. Zero means up, non-zero down. * * \return Always be CB_OKAY. */#define CB_SPIN                     0xF170/** * \def CB_FASTSPIN * \brief Fast spins the value of the spin box or auto spin box. * * \code * CB_FASTSPIN * * int direct * * wParam = direct; * lParam = 0; * \endcode * * \param direct Indicats the direct of the spin. Zero means up, non-zero down. * * \return Always be CB_OKAY. */#define CB_FASTSPIN                 0xF171/** * \def CB_SETSTRCMPFUNC * \brief 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. * * \code * static int my_strcmp (const char* s1, const char* s2, size_t n) * { *      ... *      return 0; * } * * CB_SETSTRCMPFUNC * * wParam = 0; * lParam = (LPARAM) my_strcmp; * \endcode * * \param my_strcmp Your own function to compare two strings. * * \return One of the following values: *          - CB_OKAY\n *              Success *          - CB_ERR\n *              This combobox has no list box or it is not an empty list box. */#define CB_SETSTRCMPFUNC            0xF172/** * \def CB_GETCHILDREN * \brief 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. * * \code * CB_GETCHILDREN * * HWND *wnd_edit, *wnd_listbox; * * wParam = (WPARAM)wnd_edit; * lParam = (LPARAM)wnd_listbox; * \endcode * * \param wnd_edit The buffer saving the handle to the edit box of the ComboBox control. * \param 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. * * \return Always be CB_OKAY. */#define CB_GETCHILDREN              0xF173#define CB_MSGMAX                   0xF180    /** @} end of ctrl_combobox_msgs *//* Combo Box return value */#define CB_OKAY                 LB_OKAY#define CB_ERR                  LB_ERR#define CB_ERRSPACE             LB_ERRSPACE    /**     * \defgroup ctrl_combobox_ncs Notification codes of combobox control     * @{     */#define CBN_ERRSPACE            255/** * \def CBN_SELCHANGE * \brief Notifies the change of the current selection. * * The CBN_SELCHANGE notification code is sent when the user changes the current * selection in the list box of a combo box. */#define CBN_SELCHANGE           1/** * \def CBN_DBLCLK * \brief Notifies the user has double clicked an item. * * A combo box created with the CBS_NOTIFY style sends an CBN_DBLCLK notification  * message to its parent window when the user double-clicks a string in its listbox. */#define CBN_DBLCLK              2/** * \def CBN_SETFOCUS * \brief Notifies the box has gained the input focus. */#define CBN_SETFOCUS            3/** * \def CBN_KILLFOCUS * \brief Notifies the box has lost the input focus. */#define CBN_KILLFOCUS           4/** * \def CBN_EDITCHANGE * \brief Notifies the change of the text in the edit control. * * The CBN_EDITCHANGE notification code is sent when the user has taken an action * that may have altered the text in the edit control portion of a combo box. */#define CBN_EDITCHANGE          5#define CBN_EDITUPDATE          6/** * \def CBN_DROPDOWN * \brief Notifies the list box has been dropped down. */#define CBN_DROPDOWN            7/** * \def CBN_CLOSEUP * \brief Notifies the list box has been closed up. */#define CBN_CLOSEUP             8/** * \def CBN_SELENDOK * \brief Notifies the selection of a list item. * * The CBN_SELENDOK notification code is sent when the user has  * selected a list item. */#define CBN_SELENDOK            9/** * \def CBN_SELENDCANCEL * \brief Notifies that the selection of a list item is ignored. * * The CBN_SELENDCANCEL notification code is sent when the user has selected a list * item but then selects another control or closes the dialog box. */#define CBN_SELENDCANCEL        10    /** @} end of ctrl_combobox_ncs */    /** @} end of ctrl_combobox */    /** @} end of controls */#ifdef __cplusplus}#endif  /* __cplusplus */#endif /* _MGUI_CTRL_COMBOBOX_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -