þÿ#include <wobject/xstring.hpp> #include <xcontrol/xtreeview.hpp> #include <xcontrol/xdwgrid.hpp> #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" #include "vbusiness/vframe/frame.vframe.vbusiness.hpp" using xml = KXMLDOMDocument; class __declspec(dllexport) PaperImageView : public xframe { public: PaperImageView(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} public: static PaperImageView* CreateInstance(void* implPtr, void* hWnd) { PaperImageView* pWin = new PaperImageView(implPtr, (HWND)hWnd); return pWin; } int OnCmdDispatch(xstring comdid) { if (comdid == L"xmClose") { CloseWindow(); return 1; } return 0; } int OnXCommand(TEvent* evt, LPARAM p) { return OnCmdDispatch(evt->xcommand.pStrID); } int OnAttachEvent() { AttachEvent(L"WM_XCOMMAND", (FEvent)&PaperImageView::OnXCommand); return 1; } int onload() { SetArg(); OnAttachEvent(); xaserverarg arg; int p = GetArg(); xstring guid = arg.GetArgString(L"guid"); xstring str = guid.mid(0, 2); trace(L"=====str:" + str + L"=====guid:" + guid); xstring picname = L"/business/products/chanpin/" + str + L"/" + guid + L".jpg"; imageview im = GetControl(L"im1"); im.ResetEx(); im.AddImages(picname, L""); im.Redraw(); return 1; } };