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

📄 control.h

📁 MiniGui在ucOS-ii下的一个例子
💻 H
📖 第 1 页 / 共 5 页
字号:
 * * \code * LB_GETITEMDATA * int index; * PLISTBOXITEMINFO plbii; * * wParam = (WPARAM)index; * lParam = (LPARAM)plbii; * \endcode * * \param index The index of the specified item. * \param plbii Pointer to the buffer used for storing the item data of the  *         specified item. * * \return LB_OKAY on success; LB_ERR on error. * * \sa LISTBOXITEMINFO */#define LB_GETITEMDATA          0xF199/** * \def LB_SETITEMDATA * \brief Sets item data in a list box if the box has LBS_CHECKBOX *          and/or LBS_USEICON styles. *  * An application sends LB_SETITEMDATA message to a list box to set the * check box flag and the handle of icon. Note that the text of the item * will not be changed, i.e., the field of \a string of LISTBOXITEMINFO * structure will be ignored. * * \code * LB_SETITEMDATA * int index; * PLISTBOXITEMINFO plbii; * * wParam = (WPARAM)index; * lParam = (LPARAM)plbii; * \endcode * * \param index The index of the specified item. * \param plbii Pointer to the buffer used for setting the item info of the  *         specified item. * * \return LB_OKAY on success; LB_ERR on error. * * \sa LISTBOXITEMINFO */#define LB_SETITEMDATA          0xF19A#define LB_SELITEMRANGE         0xF19B#define LB_SETANCHORINDEX       0xF19C#define LB_GETANCHORINDEX       0xF19D/** * \def LB_SETCARETINDEX * \brief Sets the focus rectangle to the item at the specified index. *  * An application sends an LB_SETCARETINDEX message to set the focus rectangle  * to the item at the specified index in a multiple-selection list box. * * \code * LB_SETCARETINDEX * int index; * * wParam = (WPARAM)index; * lParam = 0; * \endcode */#define LB_SETCARETINDEX        0xF19E/** * \def LB_GETCARETINDEX * \brief Determines the index of the item that has the focus rectangle. *  * An application sends an LB_GETCARETINDEX message to a list box to determine  * the index of the item that has the focus rectangle in a multiple-selection  * list box. * * \code * LB_GETCARETINDEX * * wParam = 0; * lParam = 0; * \endcode * * \return The index of the item that has the focus rectangle. */#define LB_GETCARETINDEX        0xF19F/** * \def LB_SETITEMHEIGHT * \brief Sets the height of all items. *  * An application sends an LB_SETITEMHEIGHT message to set the height of  * all items in a list box.  * * \code * LB_SETITEMHEIGHT * int itemHeight; * * wParam = 0; * lParam = (LPARAM)itemHeight; * \endcode * * \param itemHeight New height of item. * * \return The effective height of item. */#define LB_SETITEMHEIGHT        0xF1A0/** * \def LB_GETITEMHEIGHT * \brief Gets the height in pixels of an item specified in the wParam parameter. *  * An application sends an LB_GETITEMHEIGHT message to a list box to get the  * height in pixels of an item specified in the wParam parameter. * * \code * LB_GETITEMHEIGHT * * wParam = 0; * lParam = 0; * \endcode * * \return The height of item in the listbox. */#define LB_GETITEMHEIGHT        0xF1A1/** * \def LB_FINDSTRINGEXACT * \brief Searchs for an item that exactly matches the characters specified. *  * An application sends an LB_FINDSTRINGEXACT message to a list box to search  * it for an item that exactly matches the characters specified in the lParam parameter. * * \code * LB_FINDSTRINGEXACT * int index; * const char *string; * * wParam = (WPARAM)index; * lParam = (LPARAM)string; * \endcode * * \param index The index of the specified item. * \param string The string of the item to be searched for. * * \return The index of the found item on success, else LB_ERR. */#define LB_FINDSTRINGEXACT      0xF1A2#define LB_SETLOCALE            0xF1A5#define LB_GETLOCALE            0xF1A6#define LB_SETCOUNT             0xF1A7#define LB_INITSTORAGE          0xF1A8#define LB_ITEMFROMPOINT        0xF1A9/** * \def LB_SETTEXT * \brief Sets text of the specified item. * * \code * LB_SETTEXT * int index; * const char *string; * * wParam = (WPARAM)index; * lParam = (LPARAM)string; * \endcode * * \param index The index of the specified item. * \param string The string of the item to be set. * * \return One of the following values: *          - LB_OKAY\n Success *          - LB_ERR\n  Invalid item index or memory allocation error. */#define LB_SETTEXT              0xF1AA/** * \def LB_GETCHECKMARK * \brief Gets check mark status of an item. * * \code * LB_GETCHECKMARK * int index; * * wParam = (WPARAM)index; * lParam = 0; * \endcode * * \param index The index of the specified item. * * \return The check mark status of specified item on success; LB_ERR on error. * * \retval LB_ERR               Invalid item index or the list box have no LBS_CHECKBOX style. * \retval CMFLAG_CHECKED       The item is checked. * \retval CMFLAG_PARTCHECKED   The item is partly checked. * \retval CMFLAG_BLANK         The item is not checked. */#define LB_GETCHECKMARK         0xF1AB/** * \def LB_SETCHECKMARK * \brief Sets check mark status of an item. * * \code * LB_SETCHECKMARK * int index, status; * * wParam = (WPARAM)index; * lParam = (LPARAM)status; * \endcode * * \param index The index of the specified item. * \param status The new check mark status, can be one of the followings. *             - CMFLAG_CHECKED\n The item is checked. *             - CMFLAG_PARTCHECKED\n The item is partly checked. * * \return One of the following values: *          - LB_OKAY\n *              Success *          - LB_ERR\n *              Invalid item index or this list box have no LBS_CHECKBOX style. */#define LB_SETCHECKMARK         0xF1AC/** * \def LB_GETITEMADDDATA * \brief Gets the 32-bit data value associated with an item. *  * An application sends an LB_GETITEMADDDATA message to a list box to get the  * 32-bit data value the list box has stored for the item with index of  * \a wParam; By default this is zero. An application must set the  * item data value by sending an LB_SETITEMADDDATA message to the list box for  * this value to have meaning. * * \code * LB_GETITEMADDDATA * int index; * * wParam = (WPARAM)index; * lParam = 0; * \endcode * * \param index The index of the specified item. * * \return The 32-bit data value associated with an item on success, otherwise *         LB_ERR to indicate an error. */#define LB_GETITEMADDDATA       0xF1AD/** * \def LB_SETITEMADDDATA * \brief Associates a 32-bit data value with an item. * * An application sends an LB_SETITEMADDDATA message to associate a 32-bit data  * value specified in the \a lParam parameter with an item in the list box. * * \code * LB_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: *          - LB_OKAY\n         Success *          - LB_ERR\n          Invalid item index */#define LB_SETITEMADDDATA       0xF1AE/** * \def LB_SETSTRCMPFUNC * \brief Sets the STRCMP function used to sort items. * * An application sends an LB_SETSTRCMPFUNC message to set a  * new STRCMP function to sort items. * * Note that you should send this message before adding  * any item to the list box control. * * \code * static int my_strcmp (const char* s1, const char* s2, size_t n) * { *      ... *      return 0; * } * * LB_SETSTRCMPFUNC * * wParam = 0; * lParam = (LPARAM)my_strcmp; * \endcode * * \param my_strcmp Your own function to compare two strings. * * \return One of the following values: *          - LB_OKAY\n         Success *          - LB_ERR\n          Not an empty list box. */#define LB_SETSTRCMPFUNC        0xF1AF#define LB_MSGMAX               0xF1B0    /** @} end of ctrl_listbox_msgs */    /**     * \defgroup ctrl_listbox_ncs Notification codes of listbox control     * @{     *//** * \def LBN_ERRSPACE * \brief Indicates that memory is not enough. *  * A list box sends an LBN_ERRSPACE notification message to its parent window  * when it cannot allocate enough memory to complete the current operation. */#define LBN_ERRSPACE            255/** * \def LBN_SELCHANGE * \brief Indicates change due to mouse or keyboard user input. *  * A list box created with the LBS_NOTIFY style sends an LBN_SELCHANGE  * notification message to its parent window when the selection is about to  * change due to mouse or keyboard user input. */#define LBN_SELCHANGE           1/** * \def LBN_DBLCLK * \brief Indicates double click on an item. *  * A list box created with the LBS_NOTIFY style sends an LBN_DBLCLK notification  * message to its parent window when the user double-clicks a string in it. */#define LBN_DBLCLK              2/** * \def LBN_SELCANCEL * \brief Indicates cancel of the selection in the list box. *  * A list box created with the LBS_NOTIFY style sends an LBN_SELCANCEL  * notification message to its parent window when the user cancels the selection  * in the list box. */#define LBN_SELCANCEL           3/** * \def LBN_SETFOCUS * \brief Indicates gain of input focus. *  * A list box sends an LBN_SETFOCUS notification message to its parent window  * when the list box gains the input focus. */#define LBN_SETFOCUS            4/** * \def LBN_KILLFOCUS * \brief Indicates loss of input focus. *  * A list box sends an LBN_KILLFOCUS notification message to its parent window  * when the list box loses the input focus. */#define LBN_KILLFOCUS           5/** * \def LBN_CLICKCHECKMARK * \brief Indicates click on the check mark. */#define LBN_CLICKCHECKMARK      6/** * \def LBN_CLICKED * \brief Indicates click on the string. */#define LBN_CLICKED             7/** * \def LBN_ENTER * \brief Indicates the user has pressed the ENTER key. */#define LBN_ENTER               8    /** @} end of ctrl_listbox_ncs */    /** @} end of ctrl_listbox */#endif /* _CTRL_LISTBOX *//****** Property Sheet Control ***********************************************/#ifdef _CTRL_PROPSHEET    /**     * \defgroup ctrl_propsheet PropertySheet control     * @{     *//** * \def CTRL_PROPSHEET * \brief The class name of propsheet control. */#define CTRL_PROPSHEET       ("propsheet")    /**     * \defgroup ctrl_propsheet_styles Styles of propertysheet control     * @{     *//** * \def PSS_SIMPLE * \brief A simple property sheet control. All tabs of the control *        will have the same width. */#define PSS_SIMPLE                0x0000L/** * \def PSS_COMPACTTAB * \brief Compact tab style. The width of a tab is adaptive to the tab title. */#define PSS_COMPACTTAB            0x0001L    /** @} end of ctrl_propsheet_styles */    /**     * \defgroup ctrl_propsheet_msgs Messages of propertysheet control     * @{     */#define PS_OKAY         0#define PS_ERR          (-1)/** * \def PSM_GETACTIVEPAGE * \brief Gets the handle of current active page. * * Sends this message to retreive the propsheet window's active page. * * \code * PSM_GETACTIVEPAGE * * wParam = 0; * lParam = 0; * \endcode * * \return The handle to the active page; HWND_INVALID if no such a page. */#define PSM_GETACTIVEPAGE         0xF1C0L/** * \def PSM_SETACTIVEINDEX * \brief Changes the active page by index. * * Sends this message to change the propsheet window's active page. * * \code * PSM_SETACTIVEINDEX * int page; * * wParam = (WPARAM)page; * lParam = 0; * \endcode * * \param page Index of the page to set. * * \return PS_OKAY on success, otherwise PS_ERR. */#define PSM_SETACTIVEINDEX         0xF1C2L/** * \def PSM_GETPAGE * \brief Gets the handle of a page by index. * * Sends this message to retreive the handle to a page by index. * * \code * PSM_GETPAGE * int index; * * wParam = index; * lParam = 0; * \endcode * * \param index The index of the page. * * \return The handle to the page; HWND_INVALID if no such a page. */#define PSM_GETPAGE               0xF1C3L/** * \def PSM_GETACTIVEINDEX * \brief Gets the index of the current active page. * * Sends this message to retreive the index of the propsheet window's active page. * * \code * PSM_GETACTIVEINDEX * * wParam = 0; * lParam = 0; * \endcode * * \return The index number of the active page. */

⌨️ 快捷键说明

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