UiPicture类参考
图片控件,用于显示图片
更多...
#include <UiPicture.h>
继承自UiStatic。
所有成员的列表。
公有成员 |
BOOL | GetExtendedProperty_UiPicture (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值
|
ImagingHelper * | GetImage () |
| 获取对象内部的ImagingHelper指针
|
int | GetPaintMode () |
| 获得图片绘制模式:MZ_PAINTMODE_NORMAL, MZ_PAINTMODE_TILE_H, MZ_PAINTMODE_TILE_V, MZ_PAINTMODE_xxxx, 等.
|
void | LoadImage (LPCWSTR filename, bool bUseAlpha=true) |
| 从文件加载图片
|
void | LoadImage (HINSTANCE hInst, LPCWSTR lpType, LPCWSTR lpName, bool bUseAlpha=true) |
| 从资源加载图片
|
void | PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate) |
| 绘制控件
|
void | SetEdge_Bottom (int nValue) |
| 设置边缘(底部)
|
void | SetEdge_Left (int nValue) |
| 设置边缘(左边)
|
void | SetEdge_Right (int nValue) |
| 设置边缘(右边)
|
void | SetEdge_Top (int nValue) |
| 设置边缘(顶部)
|
BOOL | SetExtendedProperty_UiPicture (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值
|
void | SetPaintMode (int nMode) |
| 设置图片绘制模式:MZ_PAINTMODE_NORMAL, MZ_PAINTMODE_TILE_H, MZ_PAINTMODE_TILE_V, MZ_PAINTMODE_xxxx, 等.
|
| UiPicture (void) |
| ~UiPicture (void) |
保护属性 |
ImagingHelper | m_imgPic |
int | m_nEdgeBottom |
int | m_nEdgeLeft |
int | m_nEdgeRight |
int | m_nEdgeTop |
int | m_nPaintMode |
详细描述
图片控件,用于显示图片
UiPicture::SetEdge_XXXX() 用于指定不参与“平铺、拉伸”的边缘大小,有上、下、左、右四个边缘
UiPicture::SetPaintMode() 用于指定图片的绘制模式,详见 MZ_PAINTMODE_XXXX。
PaintMode的含义:中间区域的绘制模式(不包括边缘部分)
MZ_PAINTMODE_NORMAL: 所有边缘都无效(为0)
MZ_PAINTMODE_STRETCH & MZ_PAINTMODE_TILE,SetEdge_Top/SetEdge_Bottom/SetEdge_Left/SetEdge_Right 有效.
MZ_PAINTMODE_TILE_V & MZ_PAINTMODE_STRETCH_V,SetEdge_Top/SetEdge_Bottom 有效.
MZ_PAINTMODE_TILE_H & MZ_PAINTMODE_STRETCH_H,SetEdge_Left/SetEdge_Right 有效.
- 参见:
- UiPicture2
构造及析构函数文档
UiPicture::UiPicture |
( |
void |
|
) |
|
UiPicture::~UiPicture |
( |
void |
|
) |
|
成员函数文档
BOOL UiPicture::GetExtendedProperty_UiPicture |
( |
int |
nPropertyType, |
|
|
void * |
pValue, |
|
|
int |
nBufSize | |
|
) |
| | |
获取或设置对象的扩展属性值
- 参数:
-
| nPropertyType | 要获取或设置的属性类型 |
| pValue | 要获取或设置的属性值的指针 |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
- 返回:
- 操作是否成功
int UiPicture::GetPaintMode |
( |
|
) |
|
void UiPicture::LoadImage |
( |
LPCWSTR |
filename, |
|
|
bool |
bUseAlpha = true | |
|
) |
| | |
void UiPicture::LoadImage |
( |
HINSTANCE |
hInst, |
|
|
LPCWSTR |
lpType, |
|
|
LPCWSTR |
lpName, |
|
|
bool |
bUseAlpha = true | |
|
) |
| | |
void UiPicture::PaintWin |
( |
HDC |
hdcDst, |
|
|
RECT * |
prcWin, |
|
|
RECT * |
prcUpdate | |
|
) |
| | [virtual] |
绘制控件
重载此函数可以自定义控件的绘制
- 参数:
-
| hdcDst | 目的DC |
| prcWin | 控件所在区域(以HDC的左上角为原点) |
| prcUpdate | 需要更新的区域(以HDC的左上角为原点) |
重载UiStatic。
void UiPicture::SetEdge_Bottom |
( |
int |
nValue |
) |
|
void UiPicture::SetEdge_Left |
( |
int |
nValue |
) |
|
void UiPicture::SetEdge_Right |
( |
int |
nValue |
) |
|
void UiPicture::SetEdge_Top |
( |
int |
nValue |
) |
|
BOOL UiPicture::SetExtendedProperty_UiPicture |
( |
int |
nPropertyType, |
|
|
void * |
pValue, |
|
|
int |
nBufSize | |
|
) |
| | |
获取或设置对象的扩展属性值
- 参数:
-
| nPropertyType | 要获取或设置的属性类型 |
| pValue | 要设置的属性值的指针 |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
- 返回:
- 操作是否成功
void UiPicture::SetPaintMode |
( |
int |
nMode |
) |
|
成员数据文档
该类的文档由以下文件生成: