滑块控件 更多...
#include <UiStatusBar.h>
继承自UiWin。
公有成员 | |
| void | EnableValueLock (bool lock) |
| BOOL | GetExtendedProperty_UiStatusBar (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| int | GetPadpos (void) |
| int | GetPosMax () |
| int | GetPosMin () |
| int | GetTextWidth () |
| int | GetVolumeLockMax () |
| int | GetVolumeLockMin () |
| bool | IsValueLockEnable () |
| BOOL | SetExtendedProperty_UiStatusBar (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| void | SetPadpos (int iPadpos) |
| void | SetPos (int x, int y, int w, int h, UINT flags=0) |
| 设置控件的位置 | |
| void | SetRange (int min, int max) |
| void | SetSliderBitmap (ImagingHelper *sliderGray, ImagingHelper *sliderHighlight, ImagingHelper *padBitmap, int sliderEndWidth, int padWidth) |
| 设置进度条的外观 | |
| void | SetStyle (StatusBarStyle style) |
| void | SetTextWidth (int textWidth) |
| void | SetValueLock (int min, int max) |
| UiStatusBar () | |
| ~UiStatusBar () | |
保护成员 | |
| void | _CalcPadRect (RECT &rect, int posX) |
| void | _GenText () |
| void | _SetSize (int w, int h) |
| bool | CalcPadpos (void) |
| int | OnLButtonDown (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键按下时,此函数会被调用. | |
| int | OnLButtonUp (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键放开时,此函数会被调用. | |
| int | OnMouseMove (UINT fwKeys, int xPos, int yPos) |
| 当控件上鼠标移动时,此函数会被调用. | |
| void | PaintWin (HDC hdcDst, RECT *prcWin, RECT *prcUpdate) |
| 绘制控件 | |
保护属性 | |
| bool | m_bIsInPad |
| ImagingHelper * | m_bmKnob |
| ImagingHelper * | m_bmSliderLeft |
| ImagingHelper * | m_bmSliderRight |
| int | m_downRegion |
| int | m_halfKnobWidth |
| int | m_knobWidth |
| CMzString | m_leftText |
| bool | m_lockEnable |
| int | m_lockMax |
| int | m_lockMin |
| int | m_max |
| int | m_min |
| bool | m_needCalc |
| int | m_PadPos |
| RECT | m_rcPad |
| RECT | m_rcSlider |
| CMzString | m_rightText |
| int | m_sliderEndWidth |
| int | m_sliderLen |
| StatusBarStyle | m_style |
| int | m_textWidth |
滑块控件
| UiStatusBar::UiStatusBar | ( | ) |
| UiStatusBar::~UiStatusBar | ( | ) |
| void UiStatusBar::_CalcPadRect | ( | RECT & | rect, | |
| int | posX | |||
| ) | [protected] |
| void UiStatusBar::_GenText | ( | ) | [protected] |
| void UiStatusBar::_SetSize | ( | int | w, | |
| int | h | |||
| ) | [protected] |
| bool UiStatusBar::CalcPadpos | ( | void | ) | [protected] |
| void UiStatusBar::EnableValueLock | ( | bool | lock | ) |
| BOOL UiStatusBar::GetExtendedProperty_UiStatusBar | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要获取或设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| int UiStatusBar::GetPadpos | ( | void | ) |
| int UiStatusBar::GetPosMax | ( | ) |
| int UiStatusBar::GetPosMin | ( | ) |
| int UiStatusBar::GetTextWidth | ( | ) |
| int UiStatusBar::GetVolumeLockMax | ( | ) |
| int UiStatusBar::GetVolumeLockMin | ( | ) |
| bool UiStatusBar::IsValueLockEnable | ( | ) |
| int UiStatusBar::OnLButtonDown | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [protected, virtual] |
当控件被左键按下时,此函数会被调用.
重载UiWin。
| int UiStatusBar::OnLButtonUp | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [protected, virtual] |
当控件被左键放开时,此函数会被调用.
重载UiWin。
| int UiStatusBar::OnMouseMove | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [protected, virtual] |
当控件上鼠标移动时,此函数会被调用.
重载UiWin。
| void UiStatusBar::PaintWin | ( | HDC | hdcDst, | |
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) | [protected, virtual] |
绘制控件
重载此函数可以自定义控件的绘制
| hdcDst | 目的DC | |
| prcWin | 控件所在区域(以HDC的左上角为原点) | |
| prcUpdate | 需要更新的区域(以HDC的左上角为原点) |
重载UiWin。
| BOOL UiStatusBar::SetExtendedProperty_UiStatusBar | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| void UiStatusBar::SetPadpos | ( | int | iPadpos | ) |
| void UiStatusBar::SetPos | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| UINT | flags = 0 | |||
| ) | [virtual] |
| void UiStatusBar::SetRange | ( | int | min, | |
| int | max | |||
| ) |
| void UiStatusBar::SetSliderBitmap | ( | ImagingHelper * | sliderGray, | |
| ImagingHelper * | sliderHighlight, | |||
| ImagingHelper * | padBitmap, | |||
| int | sliderEndWidth, | |||
| int | padWidth | |||
| ) |
设置进度条的外观
| sliderGray | [in] 滑动条灰色背景部分的图片 | |
| sliderHighlight | [in] 滑动条高亮前景部分的图片 | |
| padBitmap | [in] 滑块的图片 | |
| sliderEndWidth | [in] 滑动条左右两端不规则形状的宽度(中间的部分在绘制时根据控件宽度进行拉伸) | |
| padWidth | [in] 滑块实心部分(有的滑块的图片带发光或者四周有透明的效果)的宽度,不一定等于滑块图片的宽度 |
| void UiStatusBar::SetStyle | ( | StatusBarStyle | style | ) | [inline] |
| void UiStatusBar::SetTextWidth | ( | int | textWidth | ) |
| void UiStatusBar::SetValueLock | ( | int | min, | |
| int | max | |||
| ) |
bool UiStatusBar::m_bIsInPad [protected] |
ImagingHelper* UiStatusBar::m_bmKnob [protected] |
ImagingHelper* UiStatusBar::m_bmSliderLeft [protected] |
ImagingHelper* UiStatusBar::m_bmSliderRight [protected] |
int UiStatusBar::m_downRegion [protected] |
int UiStatusBar::m_halfKnobWidth [protected] |
int UiStatusBar::m_knobWidth [protected] |
CMzString UiStatusBar::m_leftText [protected] |
bool UiStatusBar::m_lockEnable [protected] |
int UiStatusBar::m_lockMax [protected] |
int UiStatusBar::m_lockMin [protected] |
int UiStatusBar::m_max [protected] |
int UiStatusBar::m_min [protected] |
bool UiStatusBar::m_needCalc [protected] |
int UiStatusBar::m_PadPos [protected] |
RECT UiStatusBar::m_rcPad [protected] |
RECT UiStatusBar::m_rcSlider [protected] |
CMzString UiStatusBar::m_rightText [protected] |
int UiStatusBar::m_sliderEndWidth [protected] |
int UiStatusBar::m_sliderLen [protected] |
StatusBarStyle UiStatusBar::m_style [protected] |
int UiStatusBar::m_textWidth [protected] |
1.6.1