From 03ef0b51103c735077c784c7df81ae2bcc1599ab Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期四, 13 二月 2025 18:33:56 +0800
Subject: [PATCH] update

---
 jrj/xframe/wobject/xcontrol.hpp |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/jrj/xframe/wobject/xcontrol.hpp b/jrj/xframe/wobject/xcontrol.hpp
index c001204..6938018 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;
 
@@ -22,6 +23,14 @@
 		return ((kcontrol*)this->getNativePointer())->GetHWND();
 	}
 
+	bool operator ==(xcontrol& rhs)
+	{
+		return getNativePointer() == rhs.getNativePointer();
+	}
+	operator LPARAM()
+	{
+		return (LPARAM)getNativePointer();
+	}
 	int SetReadOnlyEx(const bool )
 	{
 		int EM_SETREADONLY_ = 0x00CF;
@@ -46,7 +55,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 +71,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