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

📄 ebcontrol.h

📁 基于minigui开发的一套图形控件系统
💻 H
📖 第 1 页 / 共 5 页
字号:


#define ETBM_SETTBBORDER	    0xF0A2

#define ETBM_GETTBBORDER	    0xF0A3



    /** @} end of ctrl_trackbar_msgs */



    /**

     * \defgroup ctrl_trackbar_ncs Notification codes of trackbar control

     * @{

     */



/**

 * \def TBN_REACHMIN

 * \brief Notifies that the slider has reached the minimum position.

 */

#define ETBN_REACHMIN                1



/**

 * \def TBN_REACHMAX

 * \brief Notifies that the slider has reached the maximum position.

 */

#define ETBN_REACHMAX                2



/**

 * \def TBN_CHANGE

 * \brief Notifies that the position of the slider has changed.

 */

#define ETBN_CHANGE                  3



    /** @} end of ctrl_trackbar_ncs */



    /** @} end of ctrl_trackbar */



/****** Static Control ******************************************************/

    /**

     * \defgroup ctrl_ebstatic Static control

     * @{

     */



/**

 * \def CTRL_EBSTATIC

 * \brief The class name of static control.

 */

#define CTRL_EBSTATIC         ("ebstatic")



    /**

     * \defgroup ctrl_static_styles Styles of static control

     * @{

     */



/**

 * \def SS_LEFT

 * \brief Displays the given text flush-left.

 */

#define ESS_LEFT             	0x00000000L



/**

 * \def SS_CENTER 

 * \brief Displays the given text centered in the rectangle. 

 */

#define ESS_CENTER           	0x00000001L



/**

 * \def SS_RIGHT

 * \brief Displays the given text flush-right.

 */

#define ESS_RIGHT            	0x00000002L



#define ESS_ALIGNMASK			0x00000003L//bit0~1





/**

 * \def SS_ICON 

 * \brief Designates an icon displayed in the static control.

 */

#define ESS_BKSYSDEFAULT		0x00000000L

#define ESS_ICON				0x00000004L

#define ESS_BITMAP				0x00000008L

#define ESS_BKBMPFILE			0x0000000CL

#define ESS_ENHMETAFILE			0x00000010L

#define ESS_BKTRANSPARENT		0x00000014L

#define ESS_BKUSECOLOR			0x00000018L

#define ESS_ALPHAIMAGE          0x0000001CL//使用透明文件来实现的

#define ESS_BKTYPEMASK			0x0000001CL//bit2~4





/**

 * \def SS_GRAYRECT

 * \brief Specifies a rectangle filled with the color used to 

 *        fill the screen background. The default is gray.

 */

#define ESS_GRAYRECT         	0x00000020L

#define ESS_BLACKRECT        	0x00000040L

#define ESS_WHITERECT       	0x00000060L

#define ESS_RECTMASK			0x00000060L//bit5~6







/**

 * \def SS_GRAYFRAME

 * \brief Specifies a box with a frame drawn with the same color as 

 *        window frames. The default is gray.

 */

#define ESS_BLACKFRAME       	0x00000080L



#define ESS_GRAYFRAME        	0x00000100L



#define ESS_WHITEFRAME       	0x00000180L

#define ESS_FRAMEMASK			0x00000180L//bit7~8;



/**

 * \def SS_GROUPBOX

 * \brief Creates a rectangle in which other controls can be grouped.

 */

#define ESS_GROUPBOX         	0x00000200L//bit9



/**

 * \def SS_SIMPLE 

 * \brief Designates a simple rectangle and displays a single line 

 *        of text flush-left in the rectangle.

 */

#define ESS_SIMPLE           	0x00000400L//bit10



/**

 * \def SS_LEFTNOWORDWRAP

 * \brief Designates a simple rectangle and displays the given text 

 *        flush-left in the rectangle. 

 *

 * Tabs are expanded, but words are not wrapped. 

 * Text that extends past the end of a line is clipped.

 */

#define ESS_LEFTNOWORDWRAP   	0x00000800L//bit11



//#define ESS_USERCOLOR        	0x00001000L//bit12

#define ESS_MULTILINE           0x00001000L

/**

 * \def SS_BITMAP

 * \brief Specifies that a bitmap will be displayed in the static control.

 */

#define ESS_TYPEMASK         	0x00001FFFL





/**

 * \def SS_NOPREFIX

 * \brief Prevents interpretation of any ampersand (&) characters in 

 *        the control's text as accelerator prefix characters.

 *

 * \note Not implemented so far.

 */

#define ESS_NOPREFIX         	0x00002000L//bit13





/**

 * \def SS_NOTIFY

 * \brief Sends the parent window notification messages when the user 

 *        clicks or double-clicks the control.

 */

#define ESS_NOTIFY           	0x00004000L//bit14

#define ESS_BKALPHA	    		0x00008000L//bit15





/** @} end of ctrl_static_styles */

    

    /**

     * \defgroup ctrl_static_msgs Messages of static control

     * @{

     */



#define ESTM_SETICON         0xF170

#define ESTM_GETICON         0xF171



/**

 * \def STM_SETIMAGE

 * \brief Associate a new image (icon or bitmap) with a static control.

 *

 * An application sends an STM_SETIMAGE message to 

 * associate a new image (icon or bitmap) with a static control.

 *

 * \code

 * STM_SETIMAGE

 * HICON image;

 *  or 

 * BITMAP* image;

 *

 * wParam = (WPARAM)image;

 * lParam = 0;

 * \endcode

 * 

 * \param image The handle to an icon if the type of static control type 

 * is SS_ICON, or the pointer to a BITMAP object if the type is SS_BITMAP.

 * \return The old image (handle or pointer).

 */

#define ESTM_SETIMAGE        0xF172



/**

 * \def STM_GETIMAGE

 * \brief Retrieves a handle to the image.

 *

 * An application sends an STM_GETIMAGE message to retrieve a handle 

 * to the image associated with a static control.

 *

 * \code

 * STM_GETIMAGE

 * wParam = 0;

 * lParam = 0;

 * \endcode

 *

 * \return The handle to the icon if the type of static control type is SS_ICON, 

 * or the pointer to the BITMAP object if the type is SS_BITMAP.

 */

#define ESTM_GETIMAGE        	0xF173

#define ESTM_GETTEXTCOLOR	0xF174

#define ESTM_SETTEXTCOLOR	0xF175



/* Not supported */

#define ESTM_MSGMAX          0xF178



    /** @} end of ctrl_static_msgs */



    /**

     * \defgroup ctrl_static_ncs Notification codes of static control

     * @{

     */



/**

 * \def STN_DBLCLK

 * \brief Notifies a double-click.

 *

 * The STN_DBLCLK notification message is sent when 

 * the user double-clicks a static control that has the SS_NOTIFY style.

 */

#define ESTN_DBLCLK          1



#define ESTN_ENABLE          2

#define ESTN_DISABLE         3



/**

 * \def STN_CLICKED

 * \brief Notifies that a static control is clicked.

 *

 * The STN_CLICKED notification message is sent 

 * when the user clicks a static control that has the SS_NOTIFY style.

 */

#define ESTN_CLICKED         4



    /** @} end of ctrl_static_ncs */



    /** @} end of ctrl_static */



/****** Button Control ******************************************************/

    /**

     * \defgroup ctrl_button Button control

     * @{

     */



/**

 * \def CTRL_BUTTON

 * \brief The class name of button control.

 */

#define CTRL_BMPBUTTON         ("bmpbutton")



    /**

     * \defgroup ctrl_button_styles Styles of button control

     * @{

     */



/**

 * \def BS_PUSHBUTTON

 * \brief Creates a push button.

 */

 //有原始、经过、按下三态,且只有一幅位图;

#define BBS_PUSHBUTTON      0x00000001L



//只有原始、经过、选中三态;三幅位图;

#define BBS_THREESTATE      0x00000002L



//有原始、经过、按下、选中四态;四幅位图;

#define BBS_FOURSTATE	    0x00000003L



//有原始、经过、点击时在经过图片的基础上闪动;两幅位图;

#define BBS_MOTIVEBUTTON    0x00000004L



//只有原始、经过两态,鼠标点击时仍然是经过态,鼠标移开则为原始态;

#define BBS_TWOSTATE        0x00000005L



//有原始\经过\点击三种状态,一幅位图,经过时在原位图上加上渐变底;

#define BBS_SUNSTYLE	    0x00000006L



//只有原始、按下两态,当按下后,只有通过消息BBM_SETSTATE才能改变其状态

#define BBS_PUSHDOWNBNT		0x00000007L



#define BBS_TYPEMASK        0x0000000FL



/**

 * \def BS_TEXT

 * \brief Specifies that the button displays text.

 */

#define BBS_TEXT            0x00000010L

#define BBS_ICON            0x00000040L

#define BBS_BMPFILE	     	0x00000080L



/**

 * \def BBS_LEFT

 * \brief Left-justifies the text in the button rectangle.

 *

 * However, if the button is a check box or radio button that 

 * does not have the BS_RIGHTBUTTON style, the text is left 

 * justified on the right side of the check box or radio button.

 */

#define BBS_LEFT            0x00000000L



/**

 * \def BS_RIGHT

 * \brief Right-justifies text in the button rectangle.

 * 

 * However, if the button is a check box or radio button that 

 * does not have the BS_RIGHTBUTTON style, the text is 

 * right justified on the right side of the check box or radio button.

 */

#define BBS_RIGHT            0x00000100L



/**

 * \def BS_CENTER

 * \brief Centers text horizontally in the button rectangle.

 */

#define BBS_CENTER           0x00000200L



/**

 * \def BS_TOP

 * \brief Places text at the top of the button rectangle.

 */

#define BBS_TOP              0x00000000L



/**

 * \def BS_BOTTOM

 * \brief Places text at the bottom of the button rectangle.

 */

#define BBS_BOTTOM           0x00000400L



/**

 * \def BS_VCENTER

 * \brief Places text in the middle (vertically) of the button rectangle.

 */

#define BBS_VCENTER          0x00000800L



#define BBS_ALIGNMASK        0x00000F00L





#define BBS_BKTRANSPARENT         0x00001000L



/**

 * \def BS_MULTLINE

 * \brief Wraps the button text to multiple lines.

 *

 * Wraps the button text to multiple lines if the text string is 

 * too long to fit on a single line in the button rectangle.

 */

#define BBS_BKALPHA         0x00002000L



/**

 * \def BS_NOTIFY

 * \brief Enables a button to send notification messages to its parent window.

 */

#define BBS_NOTIFY           0x00004000L



#define BBS_BKALPHARED		 0x00008000L		//BBS_FLAT 没有用到

    /** @} end of ctrl_button_styles */



    /**

     * \defgroup ctrl_button_states States of button control

     * @{

     */



/**

 * \def BST_UNCHECKED

 * \brief Indicates the button is unchecked.

 */

#define BBST_UNCHECKED       0x0000



/**

 * \def BST_CHECKED

 * \brief Indicates the button is checked.

 */

#define BBST_CHECKED         0x0001



/**

 * \def BST_INDETERMINATE

 * \brief Indicates the button is grayed because 

 * the state of the button is indeterminate.

 */

#define BBST_INDETERMINATE   0x0002



/**

 * \def BST_PUSHED

 * \brief Specifies the highlight state.

 */

#define BBST_PUSHED          0x0004



/**

 * \def BST_FOCUS

 * \brief Specifies the focus state.

 */

#define BBST_FOCUS           0x0008



    /** @} end of ctrl_button_states */



    /**

     * \defgroup ctrl_button_msgs Messages of button control

     * @{

     */



/**

 * \def BM_GETCHECK

 * \brief Retrieves the check state of a radio button or check box.

 *

 * An application sends a BM_GETCHECK message to retrieve 

 * the check state of a radio button or check box.

 *

 * \code

 * BM_GETCHECK

 * wParam = 0;

 * lParam = 0;

 * \endcode

 *

 * \return An integer indicates whether the button is checked.

 *

 * \retval BST_UNCHECKED The button is not checked.

 * \retval BST_CHECKED The button is checked.

 * \retval BST_INDETERMINATE The button is grayed because the state of the button is indeterminate.

 *

 * \sa ctrl_button_states

 */

#define BBM_GETCHECK             0xF0F0



/**

 * \def BM_SETCHECK

 * \brief Sets the check state of a radio button or check box.

 *

 * An application sends a BM_SETCHECK message to set 

 * the check state of a radio button or check box.

 *

 * \code

 * BM_SETCHECK

 * int check_state;

 *

 * wParam = (WPARAM)check_state;

 * lParam = 0;

 * \endcode

 *

 * \param check_state The check state of button, can be one of the following values:

 *      - BST_UNCHECKED\n

 *        Want the button to be unchecked.

 *      - BST_CHECKED\n

 *        Want the button to be checked.

 *      - BST_INDETERMINATE\n

 *        Want the button to be grayed if it is a three states button.

 */

#define BBM_SETCHECK             0xF0F1



/**

 * \def BM_GETSTATE

 * \brief Gets the state of a button or check box.

 *

 * An application sends a BM_GETSTATE message to 

 * determine the state of a button or check box.

 *

 * \code

 * BM_GETSTATE

 * wParam = 0;

 * lParam = 0;

 * \endcode

⌨️ 快捷键说明

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