![]() |
HiEasyX
Ver 0.3.0
EasyX 全面扩展库
|
系统输入框控件 更多...
#include <SysEdit.h>
类 | |
| struct | PreStyle |
| 编辑框预设样式(必须在创建前设置才有效) 更多... | |
Public 成员函数 | |
| SysEdit () | |
| SysEdit (HWND hParent, RECT rct, std::wstring strText=L"") | |
| SysEdit (HWND hParent, int x, int y, int w, int h, std::wstring strText=L"") | |
| ~SysEdit () override | |
| void | PreSetStyle (PreStyle pre_style) |
| 在创建控件前预设控件样式 更多... | |
| LRESULT | UpdateMessage (UINT msg, WPARAM wParam, LPARAM lParam, bool &bRet) override |
| 更新消息,此函数无需用户调用 更多... | |
| void | RegisterMessage (void(*pFunc)(std::wstring wstrText)) |
| 注册输入消息 更多... | |
| void | RightAlign (bool enable) |
| 设置文本右对齐 更多... | |
| void | Uppercase (bool enable) |
| 自动转大写 更多... | |
| void | Lowercase (bool enable) |
| 自动转小写 更多... | |
| void | Password (bool enable) |
| 设置密码框 更多... | |
| void | ReadOnly (bool enable) |
| 设置只读 更多... | |
| void | NumberOnly (bool enable) |
| 设置仅数字 更多... | |
| int | GetMaxTextLength () |
| 获取最大输入长度 更多... | |
| void | SetMaxTextLength (int len) |
| 限制最大输入长度 更多... | |
| void | SetBkColor (COLORREF color) |
| 设置控件背景色 更多... | |
| void | SetTextBkColor (COLORREF color) |
| 设置文本背景色 更多... | |
| void | SetTextColor (COLORREF color) |
| 设置文本颜色 更多... | |
| void | GetSel (int *begin, int *end) |
| 获取光标选择区域 更多... | |
| void | SetSel (int begin, int end) |
| 设置光标选择区域 更多... | |
| void | Copy () |
| 复制选中的文本 更多... | |
| void | Cut () |
| 剪切选中的文本 更多... | |
| void | Paste () |
| 从剪切板黏贴文本到当前位置 更多... | |
| void | Delete () |
| 删除选中的文本 更多... | |
| void | Replace (std::wstring wstrText) |
| 替换选中的文本 更多... | |
| bool | IsEdited () |
| 判断是否被编辑 更多... | |
Public 成员函数 继承自 HiEasyX::SysControlBase | |
| SysControlBase () | |
| virtual | ~SysControlBase () |
| void | UpdateRect (RECT rctOld) override |
| 响应更新区域消息 更多... | |
| 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 () |
Public 成员函数 继承自 HiEasyX::Container | |
| 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) |
Protected 成员函数 | |
| void | RealCreate (HWND hParent) override |
| 实际调用的创建控件函数(各种控件实现不同,但内部都调用 CreateControl 创建控件) 更多... | |
Protected 成员函数 继承自 HiEasyX::SysControlBase | |
| HWND | CreateControl (HWND hParent, LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle) |
| 创建控件 更多... | |
额外继承的成员函数 | |
Protected 属性 继承自 HiEasyX::SysControlBase | |
| HWND | m_hWnd = nullptr |
| HWND | m_hParent = nullptr |
| int | m_nID = 0 |
| SysControlType | m_type = SCT_Unknown |
Protected 属性 继承自 HiEasyX::Container | |
| RECT | m_rct = { 0 } |
| 容器区域 更多... | |
| HiEasyX::SysEdit::SysEdit | ( | ) |
在文件 SysEdit.cpp 第 21 行定义.
| HiEasyX::SysEdit::SysEdit | ( | HWND | hParent, |
| RECT | rct, | ||
| std::wstring | strText = L"" |
||
| ) |
在文件 SysEdit.cpp 第 25 行定义.
| HiEasyX::SysEdit::SysEdit | ( | HWND | hParent, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| std::wstring | strText = L"" |
||
| ) |
在文件 SysEdit.cpp 第 30 行定义.
|
override |
在文件 SysEdit.cpp 第 35 行定义.
| void HiEasyX::SysEdit::Copy | ( | ) |
| void HiEasyX::SysEdit::Cut | ( | ) |
| void HiEasyX::SysEdit::Delete | ( | ) |
| int HiEasyX::SysEdit::GetMaxTextLength | ( | ) |
获取最大输入长度
在文件 SysEdit.cpp 第 156 行定义.
| void HiEasyX::SysEdit::GetSel | ( | int * | begin, |
| int * | end | ||
| ) |
| bool HiEasyX::SysEdit::IsEdited | ( | ) |
判断是否被编辑
在文件 SysEdit.cpp 第 222 行定义.
| void HiEasyX::SysEdit::Lowercase | ( | bool | enable | ) |
| void HiEasyX::SysEdit::NumberOnly | ( | bool | enable | ) |
| void HiEasyX::SysEdit::Password | ( | bool | enable | ) |
| void HiEasyX::SysEdit::Paste | ( | ) |
| void HiEasyX::SysEdit::PreSetStyle | ( | PreStyle | pre_style | ) |
| void HiEasyX::SysEdit::ReadOnly | ( | bool | enable | ) |
|
overrideprotectedvirtual |
| void HiEasyX::SysEdit::RegisterMessage | ( | void(*)(std::wstring wstrText) | pFunc | ) |
| void HiEasyX::SysEdit::Replace | ( | std::wstring | wstrText | ) |
| void HiEasyX::SysEdit::RightAlign | ( | bool | enable | ) |
| void HiEasyX::SysEdit::SetBkColor | ( | COLORREF | color | ) |
| void HiEasyX::SysEdit::SetMaxTextLength | ( | int | len | ) |
| void HiEasyX::SysEdit::SetSel | ( | int | begin, |
| int | end | ||
| ) |
| void HiEasyX::SysEdit::SetTextBkColor | ( | COLORREF | color | ) |
| void HiEasyX::SysEdit::SetTextColor | ( | COLORREF | color | ) |
|
overridevirtual |
更新消息,此函数无需用户调用
| [in] | msg | 新消息 |
| [in] | wParam | 参数 |
| [in] | lParam | 参数 |
| [out] | bRet | 标记是否返回值 |
在文件 SysEdit.cpp 第 53 行定义.
| void HiEasyX::SysEdit::Uppercase | ( | bool | enable | ) |