#include <UiPicture.h>
继承自UiStatic。
公有成员 | |
| int | GetPaintMode () |
| void | LoadImage (LPCWSTR filename, bool bUseAlpha=true) |
| load image from file | |
| void | LoadImage (HINSTANCE hInst, LPCWSTR lpType, LPCWSTR lpName, bool bUseAlpha=true) |
| load image from resource | |
| void | PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate) |
| Draw the control on the destinate DC. | |
| void | SetEdge_Bottom (int nValue) |
| set the bottom edge size | |
| void | SetEdge_Left (int nValue) |
| set the left edge size | |
| void | SetEdge_Right (int nValue) |
| set the right edge size | |
| void | SetEdge_Top (int nValue) |
| set the top edge size | |
| void | SetPaintMode (int nMode) |
| UiPicture (void) | |
| ~UiPicture (void) | |
保护属性 | |
| ImagingHelper | m_imgPic |
| int | m_nEdgeBottom |
| int | m_nEdgeLeft |
| int | m_nEdgeRight |
| int | m_nEdgeTop |
| int | m_nPaintMode |
UiPicture2::SetEdge_XXXX() are used to set the edge sizes that doesn't attend stretch or tile
the meaning of Edge:the sizes that doesn't attend stretch or tile,include left, right, top, bottom four edges.
UiPicture2::SetPaintMode() is used to set the paint mode of the picture,see MZ_PAINTMODE_XXXX。
the meaning of PaintMode:the paint mode of the middle part(not include the edges)
MZ_PAINTMODE_NORMAL: edges are not available
MZ_PAINTMODE_STRETCH & MZ_PAINTMODE_TILE,SetEdge_Top/SetEdge_Bottom/SetEdge_Left/SetEdge_Right is available.
MZ_PAINTMODE_TILE_V & MZ_PAINTMODE_STRETCH_V,SetEdge_Top/SetEdge_Bottom is available.
MZ_PAINTMODE_TILE_H & MZ_PAINTMODE_STRETCH_H,SetEdge_Left/SetEdge_Right is available.
| UiPicture::UiPicture | ( | void | ) |
| UiPicture::~UiPicture | ( | void | ) |
| int UiPicture::GetPaintMode | ( | ) |
| void UiPicture::LoadImage | ( | LPCWSTR | filename, | |
| bool | bUseAlpha = true | |||
| ) |
load image from file
| void UiPicture::LoadImage | ( | HINSTANCE | hInst, | |
| LPCWSTR | lpType, | |||
| LPCWSTR | lpName, | |||
| bool | bUseAlpha = true | |||
| ) |
load image from resource
| void UiPicture::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) |
重载UiStatic。
| void UiPicture::SetEdge_Bottom | ( | int | nValue | ) |
set the bottom edge size
| void UiPicture::SetEdge_Left | ( | int | nValue | ) |
set the left edge size
| void UiPicture::SetEdge_Right | ( | int | nValue | ) |
set the right edge size
| void UiPicture::SetEdge_Top | ( | int | nValue | ) |
set the top edge size
| void UiPicture::SetPaintMode | ( | int | nMode | ) |
ImagingHelper UiPicture::m_imgPic [protected] |
int UiPicture::m_nEdgeBottom [protected] |
int UiPicture::m_nEdgeLeft [protected] |
int UiPicture::m_nEdgeRight [protected] |
int UiPicture::m_nEdgeTop [protected] |
int UiPicture::m_nPaintMode [protected] |