|  |  | 
 |  |  | #include "kobject/kwin.hpp" | 
 |  |  | #include "win32/win.hpp" | 
 |  |  | #include "wobject/xstring.hpp" | 
 |  |  |  | 
 |  |  | using kwin=Hxsoft::XFrame::IXFWin; | 
 |  |  | using kcontrol = Hxsoft::XFrame::IXFControl; | 
 |  |  |  | 
 |  |  | 
 |  |  |       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; | 
 |  |  |       return SendMessage(GetHWND(),EM_SETREADONLY,0,0); | 
 |  |  |       int EM_SETREADONLY_ = 0x00CF; | 
 |  |  |       return SendMessage(GetHWND(),EM_SETREADONLY_,0,0); | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int EnableWindow(bool abled) | 
 |  |  | 
 |  |  |     | 
 |  |  |    int GetTextLength() | 
 |  |  |    { | 
 |  |  |       int WM_GETTEXTLENGTH = 0x000E; | 
 |  |  |       int WM_GETTEXTLENGTH_ = 0x000E; | 
 |  |  |       int nLen = ::GetWindowTextLengthW(GetHWND()); | 
 |  |  |       return nLen; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    xstring GetText() | 
 |  |  |    { | 
 |  |  |       int WM_GETTEXT = 0x000D; | 
 |  |  |       int WM_GETTEXT_ = 0x000D; | 
 |  |  |       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; | 
 |  |  |    } | 
 |  |  |     | 
 |  |  |    int SetText(string value) | 
 |  |  |    { | 
 |  |  |       int WM_SETTEXT = 0x000C; | 
 |  |  |       int WM_SETTEXT_ = 0x000C; | 
 |  |  |       ::SetWindowTextW(GetHWND(),value); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  | 
 |  |  |    { | 
 |  |  |       return ((kcontrol*)this->getNativePointer())->GetElement(); | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    Hxsoft::XFrame::xbObject* QueryItem(xstring pItem) | 
 |  |  |    { | 
 |  |  |       return ((kcontrol*)this->getNativePointer())->QueryItem((LPTSTR)pItem.c_str()); | 
 |  |  |    } | 
 |  |  | }; |