系统静态控件
更多...
#include <SysStatic.h>
|
| | SysStatic () |
| |
| | SysStatic (HWND hParent, RECT rct, std::wstring strText=L"") |
| |
| | SysStatic (HWND hParent, int x, int y, int w, int h, std::wstring strText=L"") |
| |
| void | Center (bool center) |
| | 设置文本居中 更多...
|
| |
| void | Image (bool enable, IMAGE *img=nullptr) |
| | 设置图片 更多...
|
| |
| | SysControlBase () |
| |
| virtual | ~SysControlBase () |
| |
| void | UpdateRect (RECT rctOld) override |
| | 响应更新区域消息 更多...
|
| |
| virtual LRESULT | UpdateMessage (UINT msg, WPARAM wParam, LPARAM lParam, bool &bRet) |
| | 更新消息,此函数无需用户调用 更多...
|
| |
| HWND | Create (HWND hParent, RECT rct, std::wstring strText=L"") |
| |
| HWND | Create (HWND hParent, int x, int y, int w, int h, std::wstring strText=L"") |
| |
| void | Remove () |
| | 移除控件 更多...
|
| |
| HWND | GetHandle () const |
| |
| SysControlType | GetControlType () const |
| | 获取此控件类型 更多...
|
| |
| bool | IsEnable () |
| |
| void | Enable (bool enable) |
| |
| bool | IsVisible () |
| |
| void | Show (bool show) |
| |
| bool | IsFocused () |
| |
| void | SetFocus (bool focused) |
| |
| int | GetTextLength () |
| |
| std::wstring | GetText () |
| |
| void | SetText (std::wstring wstr) |
| |
| HFONT | GetFont () |
| |
| void | SetFont (int h, int w=0, std::wstring typeface=L"") |
| |
| int | GetID () |
| |
| | Container () |
| |
| virtual | ~Container () |
| |
| RECT | GetRect () const |
| |
| void | SetRect (int x, int y, int w, int h) |
| | 设置位置和宽高 更多...
|
| |
| void | SetRect (RECT rct) |
| | 设置矩形区域 更多...
|
| |
| POINT | GetPos () const |
| |
| int | GetX () const |
| |
| int | GetY () const |
| |
| void | SetPos (int x, int y) |
| |
| void | SetPos (POINT pt) |
| |
| void | Move (int x, int y) |
| |
| void | MoveRel (int dx, int dy) |
| |
| int | GetWidth () const |
| |
| void | SetWidth (int w) |
| |
| int | GetHeight () const |
| |
| void | SetHeight (int h) |
| |
| void | Resize (int w, int h) |
| |
|
| void | RealCreate (HWND hParent) override |
| | 实际调用的创建控件函数(各种控件实现不同,但内部都调用 CreateControl 创建控件) 更多...
|
| |
| HWND | CreateControl (HWND hParent, LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle) |
| | 创建控件 更多...
|
| |
系统静态控件
在文件 SysStatic.h 第 18 行定义.
◆ SysStatic() [1/3]
| HiEasyX::SysStatic::SysStatic |
( |
| ) |
|
◆ SysStatic() [2/3]
| HiEasyX::SysStatic::SysStatic |
( |
HWND |
hParent, |
|
|
RECT |
rct, |
|
|
std::wstring |
strText = L"" |
|
) |
| |
◆ SysStatic() [3/3]
| HiEasyX::SysStatic::SysStatic |
( |
HWND |
hParent, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h, |
|
|
std::wstring |
strText = L"" |
|
) |
| |
◆ Center()
| void HiEasyX::SysStatic::Center |
( |
bool |
center | ) |
|
◆ Image()
| void HiEasyX::SysStatic::Image |
( |
bool |
enable, |
|
|
IMAGE * |
img = nullptr |
|
) |
| |
设置图片
- 参数
-
| [in] | enable | 是否启用图像 |
| [in] | img | 图像 |
在文件 SysStatic.cpp 第 43 行定义.
45 long style = GetWindowLong(
GetHandle(), GWL_STYLE);
50 SetWindowLongPtr(
GetHandle(), GWL_STYLE, style);
54 HBITMAP hBitmap2 = (HBITMAP)SendMessage(
GetHandle(), STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
55 DeleteObject(hBitmap2);
◆ RealCreate()
| void HiEasyX::SysStatic::RealCreate |
( |
HWND |
hParent | ) |
|
|
overrideprotectedvirtual |
该类的文档由以下文件生成:
- E:/_MYC/_VS_Project/HiEasyX/HiEasyX/HiEasyX/HiSysGUI/SysStatic.h
- E:/_MYC/_VS_Project/HiEasyX/HiEasyX/HiEasyX/HiSysGUI/SysStatic.cpp