📄 ebcontrol.h
字号:
//
// $Id: ebcontrol.h,v 1.5 2005/10/17 07:55:53 tangjb Exp $
//
// edit.h: the head file of Edit Control module.
//
// Copyright (c) 1999, Wei Yongming.
//
// Create date: 1999/8/26
//
#ifndef EBCONTROL_H_
#define EBCONTROL_H_
#ifdef __cplusplus
extern "C" {
#endif
/****** Edit and MEdit Control ***********************************************/
#define CTRL_EBEDIT ("ebedit")
/**
* \defgroup ctrl_edit_styles Styles of edit control
* @{
*/
/**
* \def ES_LEFT
* \brief Left-aligns text.
*/
#define EES_LEFT 0x00000000L
#define EES_TOP 0x00000000L
#define EES_CENTER 0x00000001L
#define EES_RIGHT 0x00000002L//以上两种风格好像没有用到,对应编辑框来说,这两种风格似乎不可能
#define EES_VCENTER 0x00000004L
#define EES_BOTTOM 0x00000008L
#define EES_USEBORDER 0x00000010L //使用用户自己定义的颜色边框
#define EES_USEUNDERLINE 0x00000020L //使用用户自己定义的颜色下划线, 颜色通过EEM_SETBORDERCOL 来设置颜色
#define EES_BASELINE 0x00000030L
#define EES_STYLESMASK 0x00000030L
/**
* \def ES_UPPERCASE
* \brief Converts all characters to uppercase as they are typed into the edit control.
*/
#define EES_UPPERCASE 0x00000040L
/**
* \def ES_LOWERCASE
* \brief Converts all characters to lowercase as they are typed into the edit control.
*/
#define EES_LOWERCASE 0x00000080L
//#define EES_MULTILINE 0x00000004L
/**
* \def ES_PASSWORD
* \brief Displays an asterisk (*) for each character typed into the edit control.
*/
#define EES_PASSWORD 0x00000100L
//#define EES_AUTOVSCROLL 0x00000040L
//#define EES_AUTOHSCROLL 0x00000080L
//#define EES_NOHIDESEL 0x00000100L //edit by tjb 没用到
#define EES_AUTOWRAP 0x00000200L //add by tjb 2004-4-6
//#define EES_OEMCONVERT 0x00000400L
#define EES_NUMONLY 0X00000400L
/**
* \def ES_READONLY
* \brief Prevents the user from typing or editing text in the edit control.
*/
#define EES_READONLY 0x00000800L
/**
* \def ES_AUTOWRAP
* \brief Automatically wraps against border when inputting.
*/
#define EES_BKIMAGEMASK 0x00003000L
#define EES_BKIMAGENONE 0x00000000L
#define EES_BKICON 0x00001000L
#define EES_BKBITMAP 0x00002000L
#define EES_BKBMPFILE 0x00003000L
#define EES_BKALPHA 0x00004000L
#define EES_BKTRANSPARENT 0x00008000L
/** @} end of ctrl_edit_styles */
/**
* \defgroup ctrl_edit_msgs Messages of edit control
* @{
*/
#define EEM_GETSEL 0xF0B0
#define EEM_SETSEL 0xF0B1
#define EEM_GETRECT 0xF0B2
#define EEM_SETRECT 0xF0B3
#define EEM_SETRECTNP 0xF0B4
#define EEM_SCROLL 0xF0B5
#define EEM_LINESCROLL 0xF0B6
#define EEM_SCROLLCARET 0xF0B7
#define EEM_GETMODIFY 0xF0B8
#define EEM_SETMODIFY 0xF0B9
#define EEM_GETLINECOUNT 0xF0BA
#define EEM_LINEINDEX 0xF0BB
#define EEM_SETHANDLE 0xF0BC
#define EEM_GETHANDLE 0xF0BD
#define EEM_GETTHUMB 0xF0BE
#define EEM_LINELENGTH 0xF0C1
#define EEM_REPLACESEL 0xF0C2
#define EEM_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 EEM_LIMITTEXT 0xF0C5
#define EEM_CANUNDO 0xF0C6
#define EEM_UNDO 0xF0C7
#define EEM_FMTLINES 0xF0C8
#define EEM_LINEFROMCHAR 0xF0C9
#define EEM_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 EEM_SETPASSWORDCHAR 0xF0CC
#define EEM_EMPTYUNDOBUFFER 0xF0CD
#define EEM_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 EEM_SETREADONLY 0xF0CF
#define EEM_SETWORDBREAKPROC 0xF0D0
#define EEM_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 EEM_GETPASSWORDCHAR 0xF0D2
/***********************************************
*edit at 2005-4-28 by tangjb
*功能:设置多行编辑框的边框空白
* wparam = 左右两边的空白
* lparam = 上下两边的空白
************************************************/
#define EEM_SETMARGINS 0xF0D3
#define EEM_GETMARGINS 0xF0D4
#define EEM_SETLIMITTEXT EM_LIMITTEXT
#define EEM_GETMARGINS 0xF0D4
#define EEM_GETLIMITTEXT 0xF0D5
#define EEM_POSFROMCHAR 0xF0D6
#define EEM_CHARFROMPOS 0xF0D7
#define EEM_SETIMESTATUS 0xF0D8
#define EEM_GETIMESTATUS 0xF0D9
#define EEM_SETTEXTCORLOR 0xF0DA
#define EEM_GETTEXTCORLOR 0xF0DB
#define EMEM_SCROLLCHANGE 0xF0DC
//add by tjb 2004-4-2
//添加一种风格,由用户自己定义光标
/**
* \def EEM_SETUSERCARET
* \brief set edit control caret with bitmap
*
* \code
* EEM_SETUSERCARET
* int *passwdchar;
*
* wParam = 0;
* lParam = (LPARAM)bitmap name;
* \endcode
*
*/
#define EEM_SETUSERCARET 0xF0DD
//add by tjb 2004-4-2
//由用户自己定义边框或下划线的颜色
/**
* \def EEM_SETUSERCARET
* \brief set edit control caret with bitmap
*
* \code
* EEM_SETUSERCARET
* int *passwdchar;
*
* wParam = 0;
* lParam = (LPARAM)new color;
* \endcode
*
*/
#define EEM_SETBORDERCOL 0xF0DE
/***********************************************
*add at 2004-9-3 by tangjb
*功能:设置行间距,默认为 5 pixel
* lparam = newinterval;
************************************************/
#define EEM_SETINTERVAL 0xF0DF
#define EMED_STATE_YES 0x0
#define EMED_STATE_NOUP 0x1
#define EMED_STATE_NODN 0x2
#define EMED_STATE_NO 0x3
/** @} end of ctrl_edit_msgs */
/**
* \defgroup ctrl_edit_ncs Notification codes of edit control
* @{
*/
/**
* \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 EEN_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 EEN_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 EEN_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 EEN_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 EEN_CHANGE 0x0300
#define EEN_UPDATE 0x0400
#define EEN_ERRSPACE 0x0500
/**
* \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 EEN_MAXTEXT 0x0501
#define EEN_HSCROLL 0x0601
#define EEN_VSCROLL 0x0602
/**
* \def EN_ENTER
* \brief Notifies the user has type the ENTER key in a single-line edit control.
*/
#define EEN_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 EEC_LEFTMARGIN 0x0001
/**
* \def EC_RIGHTMARGIN
* \brief Value of wParam. Specifies the margins to set.
*/
#define EEC_RIGHTMARGIN 0x0002
/**
* \def EC_USEFONTINFO
* \brief Value of wParam. Specifies the margins to set.
*/
#define EEC_USEFONTINFO 0xffff
/* wParam of EM_GET/SETIMESTATUS */
/**
* \def EMSIS_COMPOSITIONSTRING
* \brief Indicates the type of status to retrieve.
*/
#define EEMSIS_COMPOSITIONSTRING 0x0001
/* lParam for EMSIS_COMPOSITIONSTRING */
/**
* \def EIMES_GETCOMPSTRATONCE
* \brief lParam for EMSIS_COMPOSITIONSTRING.
*/
#define EEIMES_GETCOMPSTRATONCE 0x0001
/**
* \def EIMES_CANCELCOMPSTRINFOCUS
* \brief lParam for EMSIS_COMPOSITIONSTRING.
*/
#define EEIMES_CANCELCOMPSTRINFOCUS 0x0002
/**
* \def EIMES_COMPLETECOMPSTRKILLFOCUS
* \brief lParam for EMSIS_COMPOSITIONSTRING.
*/
#define EEIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
/** @} end of ctrl_edit */
/****** Progress Bar Control *************************************************/
/**
* \defgroup ctrl_progbar ProgressBar control
* @{
*/
/**
* \def CTRL_PROGRESSBAR
* \brief The class name of progressbar control.
*/
#define CTRL_EBPROGRESSBAR ("ebprogressbar")
/**
* \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 EPBS_NOTIFY 0x0001L
/**
* \def PBS_VERTICAL
* \brief Creates progressbar vertically.
*/
#define EPBS_VERTICAL 0x0002L
//填充内容;
#define EPBS_FILLTYPE 0x00000070L
#define EPBS_FILLNORMAL 0x00000000L//标准填充;
#define EPBS_FILLBRUSH 0x00000010L//填充线条;
#define EPBS_FILLBMP 0x00000020L//用位图句柄填充;
#define EPBS_FILLBMPFILE 0x00000030L//用位图文件填充;
#define EPBS_FILLICON 0x00000040L//用图标填充;
//背景的方式;
#define EPBS_BKTYPE 0x00000F00L
#define EPBS_BKNORMAL 0x00000000L//常用标准背景;
#define EPBS_BKBITMAP 0x00000100L//位图句柄;
#define EPBS_BKBMPFILE 0x00000200L//位图文件;
#define EPBS_BKCOLOR 0x00000400L//纯颜色填充背景;
#define EPBS_BKALPHA 0x00000800L//背景透明;
//填充方式;
#define EPBS_POSITION 0x00001000L //使用图标定位来表示当前位置
#define EPBS_FILL 0x00002000L //使用填充图案来表示当前进度(单个图案重复填充)
#define EPBS_FILLLINE 0x00004000L //使用填充图案来表示当前位置(单个图案以长度来表示)
#define EPBS_FASTFILLLINE 0x00008000L //快速填充图案
#define EPBS_SHOWMASK 0x0000F000L
/** @} 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
*/
#define EPBM_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
*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -