From 62a635fd585aa1bafb83c2aea1ac29a508a77ae2 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期一, 22 七月 2024 23:25:50 +0800 Subject: [PATCH] update assign --- jrj/xframe/wobject/xcontrol.hpp | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/jrj/xframe/wobject/xcontrol.hpp b/jrj/xframe/wobject/xcontrol.hpp index c001204..02c03d1 100644 --- a/jrj/xframe/wobject/xcontrol.hpp +++ b/jrj/xframe/wobject/xcontrol.hpp @@ -5,6 +5,7 @@ #include "kobject/kwin.hpp" #include "win32/win.hpp" #include "wobject/xstring.hpp" + using kwin=Hxsoft::XFrame::IXFWin; using kcontrol = Hxsoft::XFrame::IXFControl; @@ -46,7 +47,8 @@ int nLen = GetTextLength(); xstring xs; - GetWindowTextW(GetHWND(),xs.sure(nLen+1),nLen + 1); + wchar_t* buf = xs.sure(nLen + 1); + GetWindowTextW(GetHWND(),buf , nLen + 1); return xs; } @@ -61,4 +63,9 @@ { return ((kcontrol*)this->getNativePointer())->GetElement(); } + + Hxsoft::XFrame::xbObject* QueryItem(xstring pItem) + { + return ((kcontrol*)this->getNativePointer())->QueryItem((LPTSTR)pItem.c_str()); + } }; -- Gitblit v1.9.3