📄 edit.h
字号:
#define EM_SETLINEHEIGHT 0xF0BE//#define EM_LINEINDEX 0xF0BD//#define EM_GETTHUMB 0xF0BE/* internal used now */#define EM_LINESCROLL 0xF0BF /** * \def EM_INSERTTEXT * \brief Inserts the specified text to the current caret position * * Normally used to input a long string. * * \code * EM_INSERTTEXT * int len; * const char *string; * * wParam = len; * lParam = (LPARAM)string; * \endcode * * \param len Length of string * \param string Pointer to the text string */#define EM_INSERTTEXT 0xF0C0#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/** * \def EM_REDO * \brief Redo operation. * * \code * * wParam = 0; * lParam = 0; * \endcode * */#define EM_REDO 0xF0C6//#define EM_CANUNDO 0xF0C6 /** * \def EM_UNDO * \brief Undo operation. * * \code * * wParam = 0; * lParam = 0; * \endcode * */#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 * char 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/** * \var typedef int (*ED_DRAWSEL_FUNC) (HWND hWnd, HDC hdc, int startx, int starty, const char* content, int len, int selout) * \brief Type of the edit control callback function on drawing selected strings. * * \param hWnd Handle of the edit control. * \param startx x value of the beginning drawing position. * \param starty y value of the beginning drawing position. * \param content the string which will be drawed. * \param len Length of the string which should be drawed by this callback. * \param selout Length of the selected string that have been drawed before calling this callback function. * * \return Width of the outputed strings. */typedef int (*ED_DRAWSEL_FUNC) (HWND, HDC, int, int, const char*, int, int);/** * \def EM_SETDRAWSELECTFUNC * \brief Sets the callback function on drawing selected chars * * \code * EM_SETDRAWSELECTFUNC * ED_DRAWSEL_FUNC drawsel; * * wParam = 0; * lParam = (LPARAM)drawsel; * \endcode * * \param drawsel The callback function used to draw selected strings. */#define EM_SETDRAWSELECTFUNC 0xF0D0/** * \def EM_SETGETCARETWIDTHFUNC * \brief Sets the callback function on getting caret width * * \code * EM_SETGETCARETWIDTHFUNC * int (*get_caret_width) (HWND, int); * * wParam = 0; * lParam = (LPARAM)get_caret_width; * \endcode * * \param get_caret_width The callback function used to get caret width. * The window handle and the maximum caret width are passed as arguments. * * \return The desired caret width. */#define EM_SETGETCARETWIDTHFUNC 0xF0D1/*#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 * * wParam = 0; * lParam = 0; * \endcode * * \return The currently used password character */#define EM_GETPASSWORDCHAR 0xF0D2#define EM_SETLIMITTEXT EM_LIMITTEXT/** * \def ED_CARETSHAPE_LINE * \brief Line-shaped caret */#define ED_CARETSHAPE_LINE 0/** * \def ED_CARETSHAPE_BLOCK * \brief Block-shaped caret */#define ED_CARETSHAPE_BLOCK 1/** * \def EM_CHANGECARETSHAPE * \brief Changes the shape of the caret * * \code * EM_CHANGECARETSHAPE * * int caret_shape; * * wParam = caret_shape; * lParam = 0; * \endcode * * \param caret_shape Shape index of the caret, can be ED_CARETSHAPE_LINE or ED_CARETSHAPE_BLOCK. * * \return The old create shape */#define EM_CHANGECARETSHAPE 0xF0D3/** * \def EM_REFRESHCARET * \brief Refresh caret of the edit control */#define EM_REFRESHCARET 0xF0D4/** * \def EM_ENABLECARET * \brief To enable or disable the input caret * * \code * EM_ENABLECARET * * BOOL bEnable; * * wParam = bEnable; * lParam = 0; * \endcode * * \param bEnable TRUE to enable caret. * * \return The previous caret enabled status. */#define EM_ENABLECARET 0xF0D5/*#define EM_SETMARGINS 0xF0D3#define EM_GETMARGINS 0xF0D4#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/** * \def EM_SETTITLETEXT * \brief Sets the title text displayed before content text. * * \code * EM_SETTITLETEXT * const char *title; * int len; * * wParam = len; * lParam = (LPARAM)title; * \endcode * * \note Implemented for TextEdit control. */#define EM_SETTITLETEXT 0xF0DC/** * \def EM_GETTITLETEXT * \brief Gets the title text displayed before content text. * * \code * EM_GETTITLETEXT * const char *buffer; * int len; * * wParam = len; * lParam = (LPARAM)buffer; * \endcode * * \param len should be length of buffer minus 1, left space for '\\0' * \param buffer string buffer * * * \return length of title * \note Implemented for TextEdit control. */#define EM_GETTITLETEXT 0xF0DD/** * \def EM_SETTIPTEXT * \brief Sets the tip text displayed when content is empty. * * \code * EM_SETTIPTEXT * const char *buffer; * int len; * * wParam = len; * lParam = (LPARAM)buffer; * \endcode * */#define EM_SETTIPTEXT 0xF0DE/** * \def EM_GETTIPTEXT * \brief Gets the tip text displayed when content is empty. * * \code * EM_GETTIPTEXT * const char *buffer; * int len; * * wParam = len; * lParam = (LPARAM)buffer; * \endcode * * \param len should be length of buffer minus 1, left space for '\\0' * \param buffer string buffer * * \return length of tip text */#define EM_GETTIPTEXT 0xF0DF#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 */ /** @} end of controls */#ifdef __cplusplus}#endif /* __cplusplus */#endif /* _MGUI_CTRL_EDIT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -