| | |
| | | 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() |
| | |
| | | for (i=0;i<s;i++) |
| | | { |
| | | KXMLDOMElement xitem= li.item(i); |
| | | void * p = new KXMLDOMElement(xitem); |
| | | int k = cbx_panelName.AddItem(xstring(i).c_str()); |
| | | cbx_panelName.SetItemData(k, (LPARAM)p); |
| | | cbx_panelName.SetItemData(k, xitem); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | 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) |
| | |
| | | { |
| | | 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(); |
| | |
| | | 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; |
| | | } |
| | |
| | | |
| | | int OnInitial() |
| | | { |
| | | if(GetParam()) |
| | | if(GetWinParam()) |
| | | { |
| | | xaserverarg& arg = *(xaserverarg*)GetParam(); |
| | | xaserverarg arg = GetArg(); |
| | | m_nHwnd = (HWND)arg.GetParam(L"hwnd"); |
| | | cbx_menu = (void*)arg.GetParam(L"memuId"); |
| | | cbx_tab = (void*)arg.GetParam(L"tabNo"); |
| | |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | |
| | | m_bCanDestroy = 1; |
| | | |
| | | tv_menu1 = GetControl(L"menu1"); |