From 54aa6f0768d1d78e54513aa1ac89a310a53db13d Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期五, 05 七月 2024 12:05:33 +0800
Subject: [PATCH] update
---
jrj/project/vindexform.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/jrj/project/vindexform.cpp b/jrj/project/vindexform.cpp
index 72ce110..8d41e92 100644
--- a/jrj/project/vindexform.cpp
+++ b/jrj/project/vindexform.cpp
@@ -99,7 +99,58 @@
alert(L"clicked");
return 1;
}
- int OnMenu(xstring hMenu)
+
+ int OnMenu(HWND hMenu)
+ {
+ if (!hMenu)
+ {
+ HWND hw = m_hMenu;
+ bool f = IsWindow(hw);
+
+ if (hw == 0 && f <= 0)
+ {
+ xaserverarg* arg = new xaserverarg();
+ HWND hWnd = GetHWND();
+ arg->SetParam(L"hwnd", (LPARAM)hWnd);
+ arg->SetParam(L"memuId", (LPARAM)cbx_menu.getNativePointer());
+ arg->SetParam(L"tabNo", (LPARAM)cbx_tab.getNativePointer());
+ arg->SetParam(L"panelNo", (LPARAM)cbx_panelNo.getNativePointer());
+ arg->SetParam(L"panelName", (LPARAM)cbx_panelName.getNativePointer());
+ xwin* pwin = OpenWindow(L"dev:xpage[vindexmenu.vx]", (LPARAM)arg);
+ m_hMenu = pwin->GetHWND();
+ hw = m_hMenu;
+ //return 1;
+ }
+ HWND HWND_TOPMOST = (HWND)-1;
+ HWND HWND_NOTOPMOST = (HWND)-2;
+ int SWP_NOSIZE = 0x0001;
+ int SWP_NOMOVE = 0x0002;
+ int SWP_SHOWWINDOW = 0x0040;
+ SetWindowPos(hw, HWND_TOPMOST, -1000, -1000, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
+ }
+ else
+ {
+ m_hMenu = hMenu;
+ }
+
+ xrect xr;
+ xcontrol xc = GetControl(L"xmMenu");
+ GetWindowRect(xc.GetHWND(), xr);
+ int l = xr.left;
+ int b = xr.bottom;
+
+ xrect r;
+ xc = GetControl(L"split");
+ GetWindowRect(xc.GetHWND(), r);
+ int t2 = r.top;
+ int b2 = r.bottom;
+
+ MoveWindow(m_hMenu, l - 7, b, 220, b2 - t2, true);
+
+ return 1;
+ }
+
+ int OnMenu1(xstring hMenu)
{
if (!hMenu)
{
@@ -460,9 +511,9 @@
if (comdid ==L"xmAssignment") OnChangeLogin();
else if (comdid == L"xmAllCaption") OnAllCaption();
- else if (comdid == L"xmMenu") OnMenu(L"");
+ else if (comdid == L"xmMenu") OnMenu(0);
else if (comdid == L"xmHelp") return OnHelp();
- else if (comdid.find(L"menuid:", 0) >= 0) OnMenu(comdid.mid(comdid.find(L":", 0) + 1, comdid.length()));
+ //else if (comdid.find(L"menuid:", 0) >= 0) OnMenu(comdid.mid(comdid.find(L":", 0) + 1, comdid.length()));
else if (comdid.find(L"menuAgent:", 0) >= 0) OnMenuAgent(comdid.mid(comdid.find(L":", 0) + 1, comdid.length()));
else if (comdid.find(L"changesheet:", 0) >= 0) OnChangeSheet(comdid.mid(comdid.find(L":", 0) + 1, comdid.length()));
//else if (comdid.find(L"openforoldid:", 0) >= 0) OnOpenForOld(comdid.mid(comdid.find(L":", 0) + 1, comdid.length()));
@@ -484,7 +535,7 @@
int OnAttachListon()
{
AttachEvent(L"WM_XCOMMAND",(FEvent)&vindexform::OnXCommand,this);
- //AttachEvent(L"mdilayer", L"LYSN_SELECTEDSHEET",OnSheetChanged);
+ //AttachEvent(L"mdilayer", L"LYSN_SELECTEDSHEET", (FEvent)&vindexform::OnSheetChanged);
////AttachEvent(L"mdilayer", L"LYSN_CLOSESHEET",OnCloseSheet);
return 1;
}
--
Gitblit v1.9.3