#include <UiButton.h>
继承自UiWin。
被UiButton_Gradient、UiButton_Image及UiButtonEx继承.
公有成员 | |
| void | EnableTextSinkOnPressed (bool bEnable) |
| when pressed, sink the text for 1 or 2 pixel. | |
| int | GetButtonMode () |
| int | GetButtonType () |
| DWORD | GetState () |
| COLORREF | GetTextColor_Pressed () |
| bool | IsEnableTextSinkOnPressed () |
| virtual int | OnLButtonDblClk (UINT fwKeys, int xPos, int yPos) |
| called when the control is double click by mouse left button. | |
| virtual int | OnLButtonDown (UINT fwKeys, int xPos, int yPos) |
| called when the control is pressed down by mouse left button. | |
| virtual int | OnLButtonUp (UINT fwKeys, int xPos, int yPos) |
| called when the mouse left button is is released on the control | |
| virtual int | OnMouseMove (UINT fwKeys, int xPos, int yPos) |
| called when the control has mouse move message. | |
| virtual void | OnStateChanged (DWORD dwState) |
| called when the button's state is changed | |
| void | PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate) |
| Draw the control on the destinate DC. | |
| void | SetButtonMode (int nMode) |
| set the button's behavior mode: Normal mode/Hold mode | |
| void | SetButtonType (int nType) |
| set the button's graphic-appearance type | |
| void | SetState (DWORD dwState) |
| void | SetTextColor_Pressed (COLORREF clr) |
| text's color of pressed state | |
| UiButton () | |
| virtual | ~UiButton () |
| UiButton::UiButton | ( | ) |
| virtual UiButton::~UiButton | ( | ) | [virtual] |
| void UiButton::EnableTextSinkOnPressed | ( | bool | bEnable | ) |
when pressed, sink the text for 1 or 2 pixel.
| int UiButton::GetButtonMode | ( | ) |
| int UiButton::GetButtonType | ( | ) |
| DWORD UiButton::GetState | ( | ) |
| COLORREF UiButton::GetTextColor_Pressed | ( | ) |
| bool UiButton::IsEnableTextSinkOnPressed | ( | ) |
| virtual int UiButton::OnLButtonDblClk | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiButton::OnLButtonDown | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiButton::OnLButtonUp | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiButton::OnMouseMove | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual void UiButton::OnStateChanged | ( | DWORD | dwState | ) | [virtual] |
called when the button's state is changed
| void UiButton::PaintWin | ( | HDC | hdcDst, | |
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) | [virtual] |
Draw the control on the destinate DC.
Override this member function to define your own drawings of the control
| hdcDst | Destinate device contact | |
| prcWin | The Rect of the control(hdc 's left-top is the origin) | |
| prcUpdate | Rect of the hdc that need to be update(hdc 's left-top is the origin) |
重载UiWin。
| void UiButton::SetButtonMode | ( | int | nMode | ) |
set the button's behavior mode: Normal mode/Hold mode
| nMode | button's behavior mode:
|
| void UiButton::SetButtonType | ( | int | nType | ) |
set the button's graphic-appearance type
| nType | Button's graphical appearance type, such as MZC_BUTTON_DEFAULT, etc. with MZC_BUTTON_ prefix. Please look at MzControlDefs.h |
| void UiButton::SetState | ( | DWORD | dwState | ) |
| void UiButton::SetTextColor_Pressed | ( | COLORREF | clr | ) |
text's color of pressed state