UiButton类参考
按钮控件.
更多...
#include <UiButton.h>
继承自UiWin。
被UiButton_Gradient、UiButton_Image、UiButtonEx、UiRichButton及UiSetDailyButton继承.
所有成员的列表。
公有成员 |
void | EnableTextSinkOnPressed (bool bEnable) |
| 按下状态时,按键的文字是否稍微下沉.
|
int | GetButtonMode () |
int | GetButtonType () |
BOOL | GetExtendedProperty_UiButton (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值
|
DWORD | GetState () |
COLORREF | GetTextColor_Pressed () |
bool | IsEnableTextSinkOnPressed () |
virtual int | OnLButtonDblClk (UINT fwKeys, int xPos, int yPos) |
| 当控件被双击时,此函数会被调用.
|
virtual int | OnLButtonDown (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键按下时,此函数会被调用.
|
virtual int | OnLButtonUp (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键放开时,此函数会被调用.
|
virtual int | OnMouseMove (UINT fwKeys, int xPos, int yPos) |
| 当控件上鼠标移动时,此函数会被调用.
|
virtual void | OnStateChanged (DWORD dwState) |
| 当按钮状态改变时被调用
|
void | PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate) |
| 绘制控件
|
void | SetButtonMode (int nMode) |
| 设置按钮的行为模式: Normal 模式 / Hold 模式
|
void | SetButtonType (int nType) |
| 设置按钮类型
|
BOOL | SetExtendedProperty_UiButton (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值
|
void | SetState (DWORD dwState) |
| 设置按钮的状态
|
void | SetTextColor_Pressed (COLORREF clr) |
| 按下状态的文本颜色
|
| UiButton () |
virtual | ~UiButton () |
详细描述
按钮控件.
这也是其它按钮控件的基类.
你可以用 UiButton::SetButtonType() 来设置按钮的不同类型(外观)
按钮被点击后,会给所在窗口发出MZ_WM_COMMAND命令通知消息, 重载MZFC窗口的CMzWndOnMzCommand(WPARAM wParam, LPARAM lParam)即可处理按钮发出的命令消息。
构造及析构函数文档
virtual UiButton::~UiButton |
( |
|
) |
[virtual] |
成员函数文档
void UiButton::EnableTextSinkOnPressed |
( |
bool |
bEnable |
) |
|
int UiButton::GetButtonMode |
( |
|
) |
|
int UiButton::GetButtonType |
( |
|
) |
|
BOOL UiButton::GetExtendedProperty_UiButton |
( |
int |
nPropertyType, |
|
|
void * |
pValue, |
|
|
int |
nBufSize | |
|
) |
| | |
获取或设置对象的扩展属性值
- 参数:
-
| nPropertyType | 要获取或设置的属性类型 |
| pValue | 要获取或设置的属性值的指针 |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
- 返回:
- 操作是否成功
DWORD UiButton::GetState |
( |
|
) |
|
COLORREF UiButton::GetTextColor_Pressed |
( |
|
) |
|
bool UiButton::IsEnableTextSinkOnPressed |
( |
|
) |
|
virtual int UiButton::OnLButtonDblClk |
( |
UINT |
fwKeys, |
|
|
int |
xPos, |
|
|
int |
yPos | |
|
) |
| | [virtual] |
当控件被双击时,此函数会被调用.
重载UiWin。
virtual int UiButton::OnLButtonDown |
( |
UINT |
fwKeys, |
|
|
int |
xPos, |
|
|
int |
yPos | |
|
) |
| | [virtual] |
当控件被左键按下时,此函数会被调用.
重载UiWin。
virtual int UiButton::OnLButtonUp |
( |
UINT |
fwKeys, |
|
|
int |
xPos, |
|
|
int |
yPos | |
|
) |
| | [virtual] |
当控件被左键放开时,此函数会被调用.
重载UiWin。
virtual int UiButton::OnMouseMove |
( |
UINT |
fwKeys, |
|
|
int |
xPos, |
|
|
int |
yPos | |
|
) |
| | [virtual] |
当控件上鼠标移动时,此函数会被调用.
重载UiWin。
virtual void UiButton::OnStateChanged |
( |
DWORD |
dwState |
) |
[virtual] |
void UiButton::PaintWin |
( |
HDC |
hdcDst, |
|
|
RECT * |
prcWin, |
|
|
RECT * |
prcUpdate | |
|
) |
| | [virtual] |
void UiButton::SetButtonMode |
( |
int |
nMode |
) |
|
设置按钮的行为模式: Normal 模式 / Hold 模式
- 参数:
-
void UiButton::SetButtonType |
( |
int |
nType |
) |
|
BOOL UiButton::SetExtendedProperty_UiButton |
( |
int |
nPropertyType, |
|
|
void * |
pValue, |
|
|
int |
nBufSize | |
|
) |
| | |
获取或设置对象的扩展属性值
- 参数:
-
| nPropertyType | 要获取或设置的属性类型 |
| pValue | 要设置的属性值的指针 |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
- 返回:
- 操作是否成功
void UiButton::SetState |
( |
DWORD |
dwState |
) |
|
void UiButton::SetTextColor_Pressed |
( |
COLORREF |
clr |
) |
|
该类的文档由以下文件生成: