From a5e61ee40488b55a4ae53dc9222a2f9ba7564ae9 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期五, 28 六月 2024 15:00:15 +0800 Subject: [PATCH] update frame --- jrj/project/business/Public/search.dialog.cpp | 90 +++++++++++++++++++++++++++++++++++++++++++++ jrj/ext-jrj/ext-jrj.vcxproj | 28 ++++++++++++++ 2 files changed, 118 insertions(+), 0 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index 085ed5c..6ba13da 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -331,10 +331,38 @@ <ClCompile Include="..\project\business\Supplier3.list.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> + <ClCompile Include="..\project\printview\Maint.Template.PrintEx.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\project\printview\Template.Print.Dialog.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\project\printview\Template.Print.ViewEx.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\project\start.vframe.vbusiness.cpp" /> <ClCompile Include="..\project\viewobject\view.base.hpp" /> <ClCompile Include="..\project\vindexform.cpp" /> <ClCompile Include="..\project\vindexmenu.cpp" /> + <ClCompile Include="..\project\workflow\workflow.actionlog.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\project\workflow\workflow.actionlog_vd.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\project\workflow\workflow.chkdlg.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\project\workflow\workflow.chkdlg_vd.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\xframe\src\nmemory.cpp" /> <ClCompile Include="..\xframe\src\nstring.cpp" /> <ClCompile Include="..\xframe\src\xstring.cpp" /> diff --git a/jrj/project/business/Public/search.dialog.cpp b/jrj/project/business/Public/search.dialog.cpp new file mode 100644 index 0000000..1898a28 --- /dev/null +++ b/jrj/project/business/Public/search.dialog.cpp @@ -0,0 +1,90 @@ +class SearchDlg : public xframe + { + xnode m_agentNode; //Agent Condition + + xcontrol sle_1; + + int SetAgent() + { + string xfNodeAgentArea = "agentarea"; + xnode anode = GetAgentNode(xfNodeAgentArea); + if(m_agentNode) + { + SetAgentNodeContent (anode,m_agentNode); + } + else + { + msxml::IXMLDOMElement xframeElement = GetElement(); + msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*"); + if(agent) + { + string s = agent.xml; + m_agentNode = SetAgentNodeContent (anode,s); + } + } + return 1; + } + + //焦点激活处理函数 + int OnSetFocus(ref TEvent evt,int param) + { + //重置工具条 + //SetAgent(); + return 1; + } + + int OnOk() + { + if(GetParam()) + { + xaserverarg arg = GetParam(); + arg.AddArg("text",GetControl("sl_search").GetText()); + CloseWindow(); + } + return 1; + } + + //命令发布函数 + int OnCmdDispatch(string comdid) + { + if(comdid=="xmCancel") + { + CloseWindow(); + return 1; + } + else if(comdid=="xmOk") return OnOk(); + return 0; + } + + //命令处理事件 + int OnXCommand(ref TXCommandEvent evt,int param) + { + return OnCmdDispatch(evt.pStrID); + } + + int OnAttachEvent() + { + //绑定工具条点击事件 + AttachEvent("WM_XCOMMAND",OnXCommand); + //获取焦点事件,用于重置工具条 + AttachEvent("WM_SETFOCUS",OnSetFocus); + } + + int onload() + { + sle_1 = GetControl("sl_search"); + int x = win32::GetWindowLong(sle_1.GetId(), -16); //GWL_STYLE + x = x+ 0x0008; + win32::SetWindowLong(sle_1.GetId(), -16,x);//sle_1是编辑窗口控件 + + OnAttachEvent(); + if(GetParam()) + { + xaserverarg arg = GetParam(); + GetControl("sl_search").SetText(arg.GetArgString("text")); + } + + return 1; + } + + }; \ No newline at end of file -- Gitblit v1.9.3