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

📄 control.h

📁 MiniGui在ucOS-ii下的一个例子
💻 H
📖 第 1 页 / 共 5 页
字号:
 * \brief Automatically wraps against border when inputting. */#define ES_AUTOWRAP            0x00002000L    /** @} end of ctrl_edit_styles */    /**     * \defgroup ctrl_edit_msgs Messages of edit control     * @{     */#define EM_GETSEL               0xF0B0#define EM_SETSEL               0xF0B1#define EM_GETRECT              0xF0B2#define EM_SETRECT              0xF0B3#define EM_SETRECTNP            0xF0B4#define EM_SCROLL               0xF0B5#define EM_LINESCROLL           0xF0B6/** * \def EM_GETCARETPOS * \brief Gets the position of the caret. * * \code * EM_GETCARETPOS * int* line_pos; * int* char_pos; * * wParam = (WPARAM)line_pos; * lParam = (LPARAM)char_pos; * \endcode * * \param line_pos Pointer to a integer buffer to save the caret line position. *        For single line editor, it is always zero. * \param char_pos Pointer to a integer buffer to save the caret character position. * * \return The character position of the caret. */#define EM_GETCARETPOS          0xF0B7/** * \def EM_SETCARETPOS * \brief Sets the position of the caret. * * \code * EM_SETCARETPOS * int line_pos; * int char_pos; * * wParam = (WPARAM)line_pos; * lParam = (LPARAM)char_pos; * \endcode * * \param line_pos The new caret line position. For single line editor, it will be ignored. * \param char_pos The new caret character position. * * \return Zero on success, otherwise -1. * * \note Not implemented for Multi-Line Edit control. */#define EM_SETCARETPOS          0xF0B8#define EM_SCROLLCARET          0xF0B9#define EM_GETMODIFY            0xF0BA#define EM_SETMODIFY            0xF0BB#define EM_GETLINECOUNT         0xF0BC#define EM_LINEINDEX            0xF0BD#define EM_GETTHUMB             0xF0BE#define EM_LINELENGTH           0xF0C1#define EM_REPLACESEL           0xF0C2#define EM_GETLINE              0xF0C4/** * \def EM_LIMITTEXT * \brief Set text limit of an edit control. * * \code * EM_LIMITTEXT * int newLimit; * * wParam = (WPARAM)newLimit; * lParam = 0; * \endcode * * \param newLimit The new text limit of an edit control. */#define EM_LIMITTEXT            0xF0C5#define EM_CANUNDO              0xF0C6#define EM_UNDO                 0xF0C7#define EM_FMTLINES             0xF0C8#define EM_LINEFROMCHAR         0xF0C9#define EM_SETTABSTOPS          0xF0CB/** * \def EM_SETPASSWORDCHAR * \brief Defines the character that edit control uses in conjunction with  * the ES_PASSWORD style. * * \code * EM_SETPASSWORDCHAR * int passwdChar; * * wParam = (WPARAM)passwdChar; * lParam = 0; * \endcode */#define EM_SETPASSWORDCHAR      0xF0CC#define EM_EMPTYUNDOBUFFER      0xF0CD#define EM_GETFIRSTVISIBLELINE  0xF0CE/** * \def EM_SETREADONLY * \brief Sets or removes the read-only style (ES_READONLY) in an edit control. * * \code * EM_SETREADONLY * int readonly; * * wParam = (WPARAM)readonly; * lParam = 0; * \endcode * * \param readonly Indicates whether the edit control is read-only: *      - Zero\n *        Not read-only. *      - Non zero\n *        Read-only. */#define EM_SETREADONLY          0xF0CF#define EM_SETWORDBREAKPROC     0xF0D0#define EM_GETWORDBREAKPROC     0xF0D1/** * \def EM_GETPASSWORDCHAR * \brief Returns the character that edit controls uses in conjunction with  * the ES_PASSWORD style. * * \code * EM_GETPASSWORDCHAR * int *passwdchar; * * wParam = 0; * lParam = (LPARAM)passwdchar; * \endcode * */#define EM_GETPASSWORDCHAR      0xF0D2#define EM_SETMARGINS           0xF0D3#define EM_GETMARGINS           0xF0D4#define EM_SETLIMITTEXT         EM_LIMITTEXT#define EM_GETLIMITTEXT         0xF0D5#define EM_POSFROMCHAR          0xF0D6#define EM_CHARFROMPOS          0xF0D7#define EM_SETIMESTATUS         0xF0D8#define EM_GETIMESTATUS         0xF0D9#define MEM_SCROLLCHANGE        0xF0DB#define MED_STATE_YES           0x0#define MED_STATE_NOUP          0x1#define MED_STATE_NODN          0x2#define MED_STATE_NO            0x3#define EM_MSGMAX               0xF0E0    /** @} end of ctrl_edit_msgs */    /**     * \defgroup ctrl_edit_ncs Notification codes of edit control     * @{     */#define EN_ERRSPACE         255/** * \def EN_CLICKED * \brief Notifies a click in an edit control. * * An edit control sends the EN_CLICKED notification code when the user clicks * in an edit control. */#define EN_CLICKED          0x0001/** * \def EN_DBLCLK * \brief Notifies a double click in an edit control. * * An edit control sends the EN_CLICKED notification code when the user  * double clicks in an edit control. */#define EN_DBLCLK           0x0002/** * \def EN_SETFOCUS * \brief Notifies the receipt of the input focus. * * The EN_SETFOCUS notification code is sent when an edit control receives  * the input focus. */#define EN_SETFOCUS         0x0100/** * \def EN_KILLFOCUS * \brief Notifies the lost of the input focus. * * The EN_KILLFOCUS notification code is sent when an edit control loses  * the input focus. */#define EN_KILLFOCUS        0x0200/** * \def EN_CHANGE * \brief Notifies that the text is altered. * * An edit control sends the EN_CHANGE notification code when the user takes  * an action that may have altered text in an edit control. */#define EN_CHANGE           0x0300#define EN_UPDATE           0x0400/** * \def EN_MAXTEXT * \brief Notifies reach of maximum text limitation. * * The EN_MAXTEXT notification message is sent when the current text  * insertion has exceeded the specified number of characters for the edit control. */#define EN_MAXTEXT          0x0501#define EN_HSCROLL          0x0601#define EN_VSCROLL          0x0602/** * \def EN_ENTER * \brief Notifies the user has type the ENTER key in a single-line edit control. */#define EN_ENTER            0x0700    /** @} end of ctrl_edit_ncs *//* Edit control EM_SETMARGIN parameters *//** * \def EC_LEFTMARGIN * \brief Value of wParam. Specifies the margins to set. */#define EC_LEFTMARGIN       0x0001/** * \def EC_RIGHTMARGIN * \brief Value of wParam. Specifies the margins to set. */#define EC_RIGHTMARGIN      0x0002/** * \def EC_USEFONTINFO * \brief Value of wParam. Specifies the margins to set. */#define EC_USEFONTINFO      0xffff/* wParam of EM_GET/SETIMESTATUS  *//** * \def EMSIS_COMPOSITIONSTRING * \brief Indicates the type of status to retrieve. */#define EMSIS_COMPOSITIONSTRING        0x0001/* lParam for EMSIS_COMPOSITIONSTRING  *//** * \def EIMES_GETCOMPSTRATONCE * \brief lParam for EMSIS_COMPOSITIONSTRING. */#define EIMES_GETCOMPSTRATONCE         0x0001/** * \def EIMES_CANCELCOMPSTRINFOCUS * \brief lParam for EMSIS_COMPOSITIONSTRING. */#define EIMES_CANCELCOMPSTRINFOCUS     0x0002/** * \def EIMES_COMPLETECOMPSTRKILLFOCUS * \brief lParam for EMSIS_COMPOSITIONSTRING. */#define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004    /** @} end of ctrl_edit */#endif /* _CTRL_EDIT || _CTRL_MEDIT *//****** Progress Bar Control *************************************************/#ifdef _CTRL_PROGRESSBAR    /**     * \defgroup ctrl_progbar ProgressBar control     * @{     *//** * \def CTRL_PROGRESSBAR * \brief The class name of progressbar control. */#define CTRL_PROGRESSBAR        ("progressbar")#define PB_OKAY                 0#define PB_ERR                  -1    /**     * \defgroup ctrl_progbar_styles Styles of progressbar control     * @{     *//** * \def PBS_NOTIFY * \brief Notifies the parent window. *  * Sends the parent window notification messages when  * the user clicks or double-clicks the control. */#define PBS_NOTIFY              0x0001L/** * \def PBS_VERTICAL * \brief Creates progressbar vertically. */#define PBS_VERTICAL            0x0002L    /** @} end of ctrl_progbar_styles */    /**     * \defgroup ctrl_progbar_msgs Messages of progressbar control     * @{     *//** * \def PBM_SETRANGE * \brief Sets the limits of the range. * * Sets the upper and lower limits of the progress bar control's range,  * and redraws the bar to reflect the new ranges. * * \code * PBM_SETRANGE * int min, max; * * wParam = (WPARAM)min; * lParam = (LPARAM)max; * \endcode * * \param min The lower limit of the progress bar. * \param max The upper limit of the progress bar. * * \return PB_OKAY on success, else PB_ERR. */#define PBM_SETRANGE            0xF0A0/** * \def PBM_SETSTEP * \brief Specifies the step increment for a progress bar control. * * \code * PBM_SETSTEP * int stepinc; * * wParam = (WPARAM)stepinc; * lParam = 0; * \endcode * * \param stepinc Step increment for a progress bar control. * \return PB_OKAY on success, else PB_ERR. */#define PBM_SETSTEP             0xF0A1/** * \def PBM_SETPOS * \brief Sets the progress bar control's current position. * * Sets the progress bar control's current position as specified by nPos,  * and redraw the bar to reflect the new position. * * \code * PBM_SETPOS * int nPos; * * wParam = (WPARAM)nPos; * lParam = 0; * \endcode * * \param nPos The progress bar control's current position. * \return Always be PB_OKAY. */#define PBM_SETPOS              0xF0A2/** * \def PBM_DELTAPOS * \brief Advances the progress bar control's current position.  * * Advances the progress bar control's current position as specified by posInc,  * and redraw the bar to reflect the new position. * * \code * PBM_DELTAPOS * int posInc; * * wParam = (WPARAM)posInc; * lParam = 0; * \endcode * * \param posInc The progress bar control's position increment. * \return Always be PB_OKAY. */#define PBM_DELTAPOS            0xF0A3/** * \def PBM_STEPIT * \brief Advances the current position by the step increment. * * Advances the current position for a progress bar control by  * the step increment, and redraw the bar to reflect the new position. * * \code * PBM_STEPIT * * wParam = 0; * lParam = 0; * \endcode * * \return Always be PB_OKAY. */#define PBM_STEPIT              0xF0A4#define PBM_MSGMAX              0xF0B0    /** @} end of ctrl_progbar_msgs */    /**     * \defgroup ctrl_progbar_ncs Notification codes of progressbar control     * @{     *//** * \def PBN_REACHMAX * \brief Notifies reach of maximum limit. * * The PBN_REACHMAX notification code is sent when the progressbar reachs its maximum limit. */#define PBN_REACHMAX            1/** * \def PBN_REACHMIN * \brief Notifies reach of minimum limit. * * The PBN_REACHMIN notification code is sent when the progressbar reachs its minimum limit. */#define PBN_REACHMIN            2    /** @} end of ctrl_progbar_ncs */    /** @} end of ctrl_progbar */#endif /* _CTRL_PROGRESSBAR *//****** List Box Control *****************************************************/#ifdef _CTRL_LISTBOX    /**     * \defgroup ctrl_listbox ListBox control     *     *     * @{     *//** * \def CTRL_LISTBOX * \brief The class name of listbox control. */#define CTRL_LISTBOX        ("listbox")/* Listbox return value */#define LB_OKAY                 0#define LB_ERR                  (-1)#define LB_ERRSPACE             (-2)#define CMFLAG_BLANK            0x0000#define CMFLAG_CHECKED          0x0001#define CMFLAG_PARTCHECKED      0x0002#define CMFLAG_MASK             0x000F#define IMGFLAG_BITMAP          0x0010/** Structrue of the listbox item info */typedef struct _LISTBOXITEMINFO{    /** Item string */    char* string;    /**      * Check mark and image flag. It can be one of the following values:     * - CMFLAG_BLANK     *   The item is blank.     * - CMFLAG_CHECKED     *   The item is checked.     * - CMFLAG_PARTCHECKED     *   The item is partly checked.     *     * For LBS_ICON list box, if you want to display bitmap other than icon,      * you can OR'd \a cmFlag whit \a IMGFLAG_BITMAP.     */    DWORD   cmFlag;         /* check mark flag */    /** Handle to the icon (or pointer to bitmap object) of the item */    HICON   hIcon;          /* handle to icon */} LISTBOXITEMINFO;/** 

⌨️ 快捷键说明

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