From a6b54d999992d72b2d9ea33efec0b7d642ea9f2d Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期四, 18 七月 2024 12:21:12 +0800
Subject: [PATCH] update
---
jrj/project/vindexmenu.cpp | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/jrj/project/vindexmenu.cpp b/jrj/project/vindexmenu.cpp
index 0f135ac..8da9fdb 100644
--- a/jrj/project/vindexmenu.cpp
+++ b/jrj/project/vindexmenu.cpp
@@ -35,8 +35,7 @@
public:
static vindexmenu* CreateInstance(void* implPtr, void* hWnd)
{
- vindexmenu* pWin = new vindexmenu(implPtr, (HWND)hWnd);
- return pWin;
+ return new vindexmenu(implPtr, (HWND)hWnd);
}
int OnHideWin()
@@ -188,10 +187,10 @@
int TPM_RIGHTBUTTON = 0x0002;
int TPM_RETURNCMD = 0x0100;
AppendMenuW(m,MF_STRING, 1, str);
- xrect xr = { 0,0,0,0 };
+ RECT xr = { 0,0,0,0 };
xpoint pt;
GetCursorPos(pt);
- return TrackPopupMenu (m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, this->GetHandle(), xr);
+ return TrackPopupMenu (m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, this->GetHandle(), &xr);
}
int OnRClicked(TEvent* evt,int p)
@@ -309,7 +308,7 @@
{
LPARAM pa = cbx_panelName.GetItemData(i);
if (!pa)return 1;
- KXMLDOMElement& hData = *(KXMLDOMElement*)pa;
+ KXMLDOMElement hData = pa;
string Name= hData.selectSingleNode(L"name").text();
string Image = L"15";
if(hData.selectSingleNode(L"image")) Image=hData.selectSingleNode(L"image").text();
@@ -320,9 +319,9 @@
str += (xstring)L"<vbox><xtree imagelist='0' name='panelTree"+xstring(no)+ L"'/></vbox>";
//AttachEvent("panelTree"+no.toString(),"TVN_SELCHANGED",OnTreeSelChanged);
xstring panelTree = L"panelTree"+xstring(no);
- AttachEvent(nstring::clone(panelTree.c_str()),L"TVN_ITEMEXPANDING", (FEvent)&vindexmenu::OnTreeExpanding);
- AttachEvent(nstring::clone(panelTree.c_str()),L"TVN_RCLICK", (FEvent)&vindexmenu::OnRClicked);
- AttachEvent(nstring::clone(panelTree.c_str()),L"NM_DBLCLK", (FEvent)&vindexmenu::OnDbClick);
+ AttachEvent(panelTree.c_str(true),L"TVN_ITEMEXPANDING", (FEvent)&vindexmenu::OnTreeExpanding);
+ AttachEvent(panelTree.c_str(true),L"TVN_RCLICK", (FEvent)&vindexmenu::OnRClicked);
+ AttachEvent(panelTree.c_str(true),L"NM_DBLCLK", (FEvent)&vindexmenu::OnDbClick);
}
toolStr += str;
}
--
Gitblit v1.9.3