From df1caf8d568251ca7db8a6edb25d2504e55cc1cd Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期四, 27 六月 2024 19:34:35 +0800 Subject: [PATCH] update string param --- jrj/xframe/src/xstring.cpp | 12 +++++++++--- jrj/project/business/HR/GraduationSchoolWin.vx.cpp | 3 +-- jrj/xframe/wobject/xstring.hpp | 6 +++++- jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp | 2 +- jrj/xframe/vbusiness/vframe/maint.vframe.vbusiness.hpp | 4 +++- jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp | 4 +++- jrj/xframe/wobject/xwin.hpp | 6 ++++++ jrj/ext-jrj/ext-jrj.vcxproj | 1 - jrj/project/business/GDN3.maint.cpp | 2 +- 9 files changed, 29 insertions(+), 11 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index 72140ea..ae5672b 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -299,7 +299,6 @@ <ClCompile Include="..\xframe\src\nstring.cpp" /> <ClCompile Include="..\xframe\src\xstring.cpp" /> <ClCompile Include="dllmain.cpp" /> - <ClCompile Include="GraduationSchool.cpp" /> <ClCompile Include="pch.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> diff --git a/jrj/project/business/GDN3.maint.cpp b/jrj/project/business/GDN3.maint.cpp index 72aebdf..9ad39fa 100644 --- a/jrj/project/business/GDN3.maint.cpp +++ b/jrj/project/business/GDN3.maint.cpp @@ -956,7 +956,7 @@ bool validProfit() { - double amt = dw_profit.GetItemString(1, L"ProfitAmountEx"); + double amt = dw_profit.GetItemDouble(1, L"ProfitAmountEx"); if (amt < 0.0) { if (dw_profit.GetItemString(1, L"Note") == L"") diff --git a/jrj/project/business/HR/GraduationSchoolWin.vx.cpp b/jrj/project/business/HR/GraduationSchoolWin.vx.cpp index cdb9721..3d7d855 100644 --- a/jrj/project/business/HR/GraduationSchoolWin.vx.cpp +++ b/jrj/project/business/HR/GraduationSchoolWin.vx.cpp @@ -141,8 +141,7 @@ dw_base.openUrl(L"/sale/view/GraduationSchool/template/win"); gsid = L""; - if (GetWinParam()) - gsid = GetWinParam(); + gsid = GetParamString(); if (gsid != L"") OnRetrieve(); diff --git a/jrj/xframe/src/xstring.cpp b/jrj/xframe/src/xstring.cpp index 3bc27b1..ff59009 100644 --- a/jrj/xframe/src/xstring.cpp +++ b/jrj/xframe/src/xstring.cpp @@ -255,6 +255,7 @@ if(rhs.data)((KStringBlock<wchar_t>*)rhs.data)->AddRef(); } + xstring::xstring(wchar_t* val, bool shouldSysFree) :data(KStringBlock<wchar_t>::make(val,shouldSysFree)) { @@ -268,14 +269,19 @@ { } +xstring::xstring(LPARAM val, bool bdata) :data(bdata?(void*)val:(KStringBlock<wchar_t>::make(val))) +{ + if (bdata) + { + ((KStringBlock<wchar_t>*)data)->AddRef(); + } +} + xstring::xstring(double val):data((KStringBlock<wchar_t>::make(val))) { } -xstring::xstring(LPARAM val):data((KStringBlock<wchar_t>::make(val))) -{ -} xstring::~xstring() { diff --git a/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp b/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp index 550e593..595ffb9 100644 --- a/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp +++ b/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp @@ -7,7 +7,7 @@ { public: xframe(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) { - this->SetArg(); + } static int getUrl(string url1, string para, KXMLDOMDocument x) diff --git a/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp b/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp index 828153e..cb39487 100644 --- a/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp +++ b/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp @@ -18,7 +18,9 @@ int m_pageNumber; listEx* m_listEx; - listwin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd){} + listwin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd){ + this->SetArg(); + } xstring GetEntityWorkNode(/*param*/LPARAM pr, xstring what) { diff --git a/jrj/xframe/vbusiness/vframe/maint.vframe.vbusiness.hpp b/jrj/xframe/vbusiness/vframe/maint.vframe.vbusiness.hpp index 18eb1d6..6a99b04 100644 --- a/jrj/xframe/vbusiness/vframe/maint.vframe.vbusiness.hpp +++ b/jrj/xframe/vbusiness/vframe/maint.vframe.vbusiness.hpp @@ -14,7 +14,9 @@ KXMLDOMDocument m_configDoc; string m_EntityID; - maint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} + maint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) { + this->SetArg(); + } xstring GetEntityWorkNode(LPARAM pr, xstring what) { if (m_configDoc) diff --git a/jrj/xframe/wobject/xstring.hpp b/jrj/xframe/wobject/xstring.hpp index 8049037..c65960c 100644 --- a/jrj/xframe/wobject/xstring.hpp +++ b/jrj/xframe/wobject/xstring.hpp @@ -17,12 +17,16 @@ xstring(int val); xstring(double val); - xstring(LPARAM val); + xstring(LPARAM val,bool bdata=false); xstring(wchar_t* val, bool shouldSysFree = false); xstring(const wchar_t* val, bool shouldSysFree = false); ~xstring(); public: + operator LPARAM() + { + return (LPARAM)data; + } operator const wchar_t*() { return c_str(); diff --git a/jrj/xframe/wobject/xwin.hpp b/jrj/xframe/wobject/xwin.hpp index 5929193..1afa2b1 100644 --- a/jrj/xframe/wobject/xwin.hpp +++ b/jrj/xframe/wobject/xwin.hpp @@ -120,6 +120,12 @@ { return getKWin()->SetParam((void*)pParam); } + xstring GetParamString() + { + if (!GetWinParam())return xstring(); + return xstring(GetWinParam(), true); + } + LPARAM GetFrameParam() { return (LPARAM)getKWin()->GetFrameParam(); -- Gitblit v1.9.3