From abf4b5dc24ce08d0b96da1bef2b283a7987185eb Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期二, 23 七月 2024 11:19:26 +0800 Subject: [PATCH] update menu --- jrj/project/vindexform.cpp | 15 +++++++++++---- jrj/project/vindexmenu.cpp | 2 +- jrj/ext-jrj/ext-jrj.vcxproj.filters | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj.filters b/jrj/ext-jrj/ext-jrj.vcxproj.filters index 2586478..c1e1e2d 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj.filters +++ b/jrj/ext-jrj/ext-jrj.vcxproj.filters @@ -434,9 +434,6 @@ <ClCompile Include="..\project\vindexform.cpp"> <Filter>vbusiness\wface</Filter> </ClCompile> - <ClCompile Include="..\project\vindexmenu.cpp"> - <Filter>vbusiness\wface</Filter> - </ClCompile> <ClCompile Include="..\project\business\EnquiryEx3.list.cpp"> <Filter>project\business</Filter> </ClCompile> @@ -1250,5 +1247,8 @@ <ClCompile Include="..\project\business\Expense\APNew.cpp"> <Filter>project\business\VATNotify</Filter> </ClCompile> + <ClCompile Include="..\project\vindexmenu.cpp"> + <Filter>vbusiness\wface</Filter> + </ClCompile> </ItemGroup> </Project> \ No newline at end of file diff --git a/jrj/project/vindexform.cpp b/jrj/project/vindexform.cpp index 83c3905..1604f3f 100644 --- a/jrj/project/vindexform.cpp +++ b/jrj/project/vindexform.cpp @@ -103,9 +103,8 @@ if (!hMenu) { HWND hw = m_hMenu; - bool f = IsWindow(hw); - - if (hw == 0 && f <= 0) + bool bwin = hw ? IsWindow(hw):false; + if (!bwin) { xaserverarg* arg = new xaserverarg(); HWND hWnd = GetHWND(); @@ -256,9 +255,16 @@ int ResetMenu() { + ::DestroyWindow(m_hMenu); + m_hMenu = 0; + return 1; + //if(m_nHwnd) xwin::CloseWindow(m_nHwnd); m_nHwnd = 0; + OnMenu(NULL); + OnMenuAgent(L""); +#if 0 menuShow = -1; xstring f = getHomeConfig(L"menuposition"); if (f == L"0") @@ -267,6 +273,7 @@ OnMenuAgent(L""); } + xaserverarg arg; HWND h = GetHWND(); @@ -274,7 +281,7 @@ arg.SetParam(L"hwnd", h); OpenWindow(L"dev:xpage[vindexforold.vx]", arg); - +#endif return 1; } diff --git a/jrj/project/vindexmenu.cpp b/jrj/project/vindexmenu.cpp index 90c7c49..6846501 100644 --- a/jrj/project/vindexmenu.cpp +++ b/jrj/project/vindexmenu.cpp @@ -56,7 +56,7 @@ int WA_ACTIVE = 1; int WA_CLICKACTIVE = 2; int SW_HIDE=0x1; - WPARAM lw = evt->wParam & 0xffff; + WPARAM lw = evt->wParam; int x = m_bCanDestroy; if( lw ==WA_INACTIVE && x==1 ) { -- Gitblit v1.9.3