þÿ#include <wobject/xstring.hpp> #include <xcontrol/xtreeview.hpp> #include <xcontrol/xdwgrid.hpp> #include <xcontrol/xcell.hpp> #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" using xml = KXMLDOMDocument; class __declspec(dllexport) memoeditnew : public xwin { public: memoeditnew(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} public: static memoeditnew* CreateInstance(void* implPtr, void* hWnd) { memoeditnew* pWin = new memoeditnew(implPtr, (HWND)hWnd); return pWin; } int OnCmdDispatch(xstring comdid) { if (comdid == L"xmOK") { if (GetWinParam()) { xcontrol xc = GetControl(L"MemoTxt"); xstring str = L"" + xc.GetText(); //trace(str); /*xsedit xc = new xsedit; xc.setNativePointer(GetControl(L"MemoTxt")); xstring str; xc.GetContent(str);*/ int p = GetWinParam(); xaserverarg arg ; arg.AddArg(L"value", L"" + str); arg.AddArg(L"comdid", L"" + comdid); } } CloseWindow(); return 0; } //T}NäYtN‹Nö int OnXCommand(TEvent* evt, LPARAM p) { return OnCmdDispatch(evt->xcommand.pStrID); } int OnAttachEvent() { //~Ñ[š]åQwgap¹QûN‹Nö AttachEvent(L"WM_XCOMMAND", (FEvent)&memoeditnew::OnXCommand); return 1; } int onload() { SetArg(); OnAttachEvent(); if (GetWinParam()) { int p = GetWinParam(); xaserverarg arg =GetArg(); xcontrol xc = GetControl(L"MemoTxt"); //trace(arg.GetArgString(L"value")); xstring str = L"" + xstring(arg.GetArgString(L"value")); str = str.replace(L"\r\n", L"\n"); str = str.replace(L"\n", L"\r\n"); xc.SetText(str); /*xsedit xc = new xsedit; xc.setNativePointer(GetControl(L"MemoTxt")); xstring str = L""+arg.GetArgString(L"value"); xc.LoadContent(str,L".xml");*/ } return 1; } };