📄 ebcontrol.h
字号:
*
* \return An integer indicates the button state.
*
* \sa ctrl_button_states
*/
#define BBM_GETSTATE 0xF0F2
/**
* \def BM_SETSTATE
* \brief Sets the state of a button.
*
* An application sends a BM_GETSTATE message to set the state of a
* button.
*
* \code
* BM_SETSTATE
* int push_state;
*
* wParam = (WPARAM)push_state;
* lParam = 0;
* \endcode
*
* \param push_state The push state of a button, can be one of the following values:
* - Zero\n
* Want the button to be unpushed.
* - Non zero\n
* Want the button to be pushed.
*/
#define BBM_SETSTATE 0xF0F3
/**
* \def BM_SETSTYLE
* \brief Changes the style of a button.
*
* An application sends a BM_SETSTYLE message to change the style of a button.
*
* \code
* BM_SETSTYLE
* int button_style;
*
* wParam = (WPARAM)button_style;
* lParam = 0;
* \endcode
*
* \param button_style The styles of a button:
*
* \sa ctrl_button_styles
*/
#define BBM_SETSTYLE 0xF0F4
/**
* \def BM_CLICK
* \brief Simulates the user clicking a button.
*
* An application sends a BM_CLICK message to simulate the user clicking a button.
*
* \code
* BM_CLICK
*
* wParam = 0;
* lParam = 0;
* \endcode
*/
#define BBM_CLICK 0xF0F5
/**
* \def BM_GETIMAGE
* \brief Retrieves the handle to the image.
*
* An application sends a BM_GETIMAGE message to
* retrieve a handle to the image (icon or bitmap) associated with the button.
*
* \code
* BM_GETIMAGE
* int image_type;
*
* wParam = (WPARAM)image_type;
* lParam = 0;
* \endcode
*
* \param image_type The type of a button image, can be one of the following values:
* - BM_IMAGE_BITMAP\n
* Bitmap of a button.
* - BM_IMAGE_ICON\n
* Icon of a button.
*
* \return A handle of the bitmap or icon of a button.
*/
#define BBM_GETIMAGE 0xF0F6
#define BBM_SETTEXTCOLOR 0xF0F7
#define BBM_GETTEXTCOLOR 0xF0F8
#define BBM_IMAGE_BITMAP 1
#define BBM_IMAGE_ICON 2
/**
* \def BM_SETIMAGE
* \brief Associates a new image (icon or bitmap) with the button.
*
* An application sends a BM_SETIMAGE message to
* associate a new image (icon or bitmap) with the button.
*
* Please use BM_IMAGE_BITMAP or BM_IMAGE_ICON as the first parameter of the message
* to indicate the type of button control image:
* - BM_IMAGE_BITMAP\n
* Specifies the type of image to associate with the button to be a bitmap.
* - BM_IMAGE_ICON\n
* Specifies the type of image to associate with the button to be an icon.
*/
#define BBM_SETIMAGE 0xF0F9
//两态时,人为控制其状态为未点击
#define BBM_SETUNCLICK 0xF0FA
/** @} end of ctrl_button_msgs */
/**
* \defgroup ctrl_button_ncs Notification codes of button control
* @{
*/
/**
* \def BN_CLICKED
* \brief The BN_CLICKED notification message is sent when the user clicks a button.
*/
#define BBN_CLICKED 0
#define BBN_PAINT 1
#define BBN_HILITE 2
#define BBN_UNHILITE 3
#define BBN_DISABLE 4
#define BBN_DOUBLECLICKED 5
/**
* \def BN_PUSHED
* \brief The BN_PUSHED notification message is sent when the user pushes a button.
*/
#define BBN_PUSHED BBN_HILITE
/**
* \def BN_UNPUSHED
* \brief The BN_UNPUSHED notification message is sent when the user unpushes a button.
*/
#define BBN_UNPUSHED BBN_UNHILITE
/**
* \def BN_DBLCLK
* \brief The BN_DBLCLK notification message is sent when the user double-clicks a button.
*/
#define BBN_DBLCLK BBN_DOUBLECLICKED
/**
* \def BN_SETFOCUS
* \brief The BN_SETFOCUS notification message is sent when a button receives the keyboard focus.
*/
#define BBN_SETFOCUS 6
/**
* \def BN_KILLFOCUS
* \brief The BN_KILLFOCUS notification message is sent when a button loses the keyboard focus.
*/
#define BBN_KILLFOCUS 7
#define BBN_MOUSEOVER 8
/** @} end of ctrl_button */
/************************** List View control ********************************/
/**
* \defgroup mgext_ctrl_listview ListView control
* @{
*/
#define CTRL_EBLISTVIEW ("EBListView")
/**/
typedef struct _EBLVEXTDATA
{
int nItemHeight;//条目的高度(含间隔);
int nItemGap;//条目间的间隔;
DWORD nSelectBKColor;//选中后的背景颜色;
DWORD nSelectTextColor;//选中后文字的显示颜色;
DWORD nItemBKColor; //条目的背景色;
DWORD nItemTextColor;//条目的文字颜色;
DWORD nMouseOverBkColor;//鼠标经过时背景色;
DWORD nMouseOverTextColor;//鼠标经过时文字颜色;
DWORD nItemBKImage;//条目的背景图片;
DWORD nBKImage;//窗口的背景图片;
}EBLVEXTDATA,*PEBLVEXTDATA;
/** Struct of the listview item info */
typedef struct _EBLVITEM
{
/** the rows of the item */
int nItem;
} EBLVITEM;
typedef EBLVITEM *PEBLVITEM;
#define SUBITEM_WORD_NORMALFONT 0x00000001L //普通字体
#define SUBITEM_WORD_SHADOWFONT 0x00000002L //阴影字
typedef struct _EBLVSUBITEMWORDTYPE
{
int topoffset;
int leftoffset;
DWORD shadowcolor; //阴影字的阴影的颜色
DWORD wordfont; //如:阴影字,普通字
}SIWORDTYPE,*PSIWORDTYPE;
/** Struct of the listview subitem info */
typedef struct _EBLVSUBITEM
{
/** this Subitem vertical position(rows) */
int nItem;
/** this Subitem horizontal position(columns) */
int subItem;
DWORD mask;//LV_TEXT,LV_IMAGE,LV_IMAGEFILE,LV_ICON,LVIF_PARAM ;
char* pszText;//文字或图片文件名
int cchTextMax;//缓冲区最大长度;
DWORD iImage;//图标文件;
DWORD lparam;//附加数据;
PSIWORDTYPE wordtype; //文字的附加信息
/** the pointer of the Content of this subitem */
//char *pszText;
} EBLVSUBITEM;
typedef EBLVSUBITEM *PEBLVSUBITEM;
/** Struct of the listview column info */
typedef struct _EBLVCOLOUM
{
/** the horizontal position */
int nCols;
/** column's width */
int width;
/** the title of this column */
char *pszHeadText;
} EBLVCOLOUM;
typedef EBLVCOLOUM *PEBLVCOLOUM;
/** Struct of finding a certain item info */
typedef struct _EBLVFINDINFO
{
/** the found item's row */
int nCols;
/** all the subitem's content of this item */
char **pszInfo;
} EBLVFINDINFO;
typedef EBLVFINDINFO *PEBLVFINDINFO;
#define ELVS_BKMASK 0x00000003L
#define ELVS_BKNONE 0x00000000L//无背景图片
#define ELVS_BKBRUSH 0x00000001L//用画刷来填充背景;
#define ELVS_BKBITMAP 0x00000002L//用BITMAP做背景图;
#define ELVS_BKBMPFILE 0x00000003L//用图片文件做背景图;
#define ELVS_BKIMAGEALIGNMASK 0x0000000CL
#define ELVS_BKIMAGEFLAT 0x00000000L//平铺;
#define ELVS_BKIMAGECENTER 0x00000004L//居中;
#define ELVS_BKIMAGELEFTTOP 0x00000008L//左上角;
#define ELVS_TEXTTRANSPARENT 0x00000010L//文字是否背景透明;
#define ELVS_ITEMUSERCOLOR 0x00000020L//是否条目用自已的颜色;
#define ELVS_USEHEADER 0x00000040L//是否显示头;
#define ELVS_BKALPHA 0x00000080L//背景是否带透明值;
#define ELVS_ITEMBKMASK 0x00000300L
#define ELVS_ITEMBKINONE 0x00000000L
#define ELVS_ITEMBKICON 0x00000100L
#define ELVS_ITEMBKBITMAP 0x00000200L
#define ELVS_ITEMBKBMPFILE 0x00000300L
#define ELVS_TYPE3STATE 0x00000400L//支持三态,正常、鼠标经过、按下三态;
#define ELVS_TYPE2STATE 0x00000800L//支持三态,正常、鼠标经过两态;
#define ELVS_BKSCROLL 0x00001000L//支持背景滚动;
#define ELVS_SPECIAL2STATE 0x00002000L//支持两态,鼠标经过和按下状态,
#define ELVS_MULTILINE 0x00004000L//多行显示文本
#define ELVS_USECHECKBOX 0x00008000L//支持列表选择框(在列表左边显示一个选择框)
//add by tjb 2004-8-4
/**
* \defgroup mgext_ctrl_listview_msgs Messages of ListView control
* @{
*/
/**
* \def LVM_ADDITEM Add a item to listview.
* \brief Adds a item to listview, this item is also called a row.
*
* \code
* LVM_ADDITEM
* PLVITEM p;
*
* lParam =(LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the Pointer of the item to be added.
*/
#define ELVM_ADDITEM 0xF110
/**
* \def LVM_FILLSUBITEM Add a subitem to listview.
* \brief Adds a subitem to listview, indentified by rows and columns.
*
* \code
* LVM_FILLSUBITEM
* PLVSUBITEM p;
*
* lParam = (LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the Pointer of the subitem to be added.
*/
#define ELVM_FILLSUBITEM 0xF111
/**
* \def LVM_ADDCOLUMN
* \brief Adds a column to listview, indentified by columns.
*
* \code
* LVM_ADDCOLUMN
* PLVCOLOUMN p;
*
* lParam =(LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the Pointer of the column to be added.
*/
#define ELVM_ADDCOLUMN 0xF112
/**
* \def LVM_DELITEM
* \brief Deletes a item form listview, also called a row.
*
* \code
* LVM_DELITEM
* PLVITEM p;
*
* lParam = (LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the ponter of the column to be removed.
*/
#define ELVM_DELITEM 0xF113
/**
* \def LVM_CLEARSUBITEM
* \brief Deletes a subitem from listview, indentified by rows and columns.
*
* \code
* LVM_CLEARSUBITEM
* PLVSUBITEM p
* lParam = (LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the Pointer of the sub item to be removed.
*/
#define ELVM_CLEARSUBITEM 0xF114
/**
* \def LVM_DELCOLUMN
* \brief Deletes a column from listview, all subitem in this column are removed.
*
* \code
* LVM_DELCOLUMN
* lParam =(LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the Pointer of the column to be removed.
*/
#define ELVM_DELCOLUMN 0xF115
/**
* \def LVM_COLSORT
* \brief Sorts all subitems in a certain columns in hi-order or low-order.
*
* \code
* LVM_COLSORT
* lParam = (LPARAM)p;
* wParam = 0;
* \endcode
*
* \param p the Pointer to the struct of how and which column is tobe sorted.
*/
#define ELVM_COLSORT 0xF116
/**
* \def ELVM_SETITEMCOLOR
* \brief Sets a item in listview to a certain color.
*
* \code
* LVM_SETITEMCOLOR
* int color;
* int rows;
* lParam = (LPARAM)color;
* wParam = (WPARAM)rows;
* \endcode
*
* \param color the color to set.
* \param rows the item to set.
*/
#define ELVM_SETITEMCOLOR 0xF117
/**
* \def LVM_FINDITEM
*
* \code
* LVM_FINDITEM
* \endcode
*/
#define ELVM_FINDITEM 0xF118
/**
*
* \def LVM_GETSUBITEM
* \brief Gets a subitem copy from listview in certain rows and columns.
*
* \code
* LVM_GETSUBITEM
* PLVSUBITEM p;
* lParam = (LPARAM)p;
* \endcode
*
* \param p the struct of the subitem to be finded, rows, cols etc.
* \return the target subitem's copy.
*/
#define ELVM_GETSUBITEM 0xF119
/**
* \def LVM_GETITEMCOUNT
* \brief Gets the number of all the items(rows) in listview.
*
* \code
* LVM_GETITEMCOUNT
* \endcode
* \return the number of all the items in listview.
*/
#define ELVM_GETITEMCOUNT 0xF11A
/**
* \def LVM_GETCOLUMNCOUNT
* \brief Gets the number of all the columns in listview.
*
* \code
* LVM_GETCOLUMNCOUNT
* \endcode
*
* \return the number of all the coloumns in listview.
*/
#define ELVM_GETCOLUMNCOUNT 0xF11B
/**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -