| | |
| | | |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) vindexform: public xframe |
| | | class __declspec(dllexport) vindexform: public xwin |
| | | { |
| | | public: |
| | | string m_Assignment; |
| | |
| | | int menuShow; |
| | | |
| | | HWND m_npHwnd2; //openwindow |
| | | int m_startwin; |
| | | HWND m_startwin; |
| | | |
| | | public: |
| | | vindexform(void* implPtr,HWND hWnd):xwin(implPtr,hWnd){} |
| | |
| | | alert(L"clicked"); |
| | | return 1; |
| | | } |
| | | int OnMenu(HWND hMenu) |
| | | int OnMenu(xstring hMenu) |
| | | { |
| | | if (!hMenu) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | m_hMenu = hMenu; |
| | | m_hMenu = (HWND)hMenu.toInt64(); |
| | | } |
| | | |
| | | xrect xr; |
| | |
| | | else |
| | | AppendMenu(m, MF_STRING, i + 1, name); |
| | | } |
| | | xrect xr; |
| | | RECT xr; |
| | | xpoint pt; |
| | | GetCursorPos(pt); |
| | | int res = TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), xr); |
| | | int res = TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), &xr); |
| | | if (res == 0) return 0; |
| | | KXMLDOMElement ele = li.item(res - 1); |
| | | xstring sInfoEx = ele.selectSingleNode(L"AssignmentID").text(); |
| | |
| | | else |
| | | AppendMenu(m, MF_STRING, i + 1, str); |
| | | } |
| | | xrect xr; |
| | | RECT xr; |
| | | xpoint pt; |
| | | GetCursorPos(pt); |
| | | int res = TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), xr); |
| | | int res = TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), &xr); |
| | | if (res == 0) return 0; |
| | | int nSheet = mainsheet.GetSheetIndex(); |
| | | if (nSheet == (res - 1)) return 0; |
| | |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | #if 0 |
| | | int OnOpen(xstring pa) |
| | | { |
| | | //xwin::SendMessage(m_npHwnd2, 0x401, pa, 0); |
| | |
| | | }*/ |
| | | |
| | | xaserverarg arg ; |
| | | |
| | | xstring isnew = arg.GetArgString(L"_isNewModule"); |
| | | xstring vx = arg.GetArgString(L"_ModuelPage"); |
| | | if (isnew == L"Y") |
| | |
| | | openUrl(vx, p); |
| | | return 1; |
| | | } |
| | | OpenWindow(L"dev:xpage[vindexforold.vx]", p); |
| | | //OpenWindow(L"dev:xpage[vindexforold.vx]", p); |
| | | return 1; |
| | | } |
| | | |
| | | int OnOpenForOld(xstring pa) |
| | | { |
| | | m_npHwnd2 = pa.toInt(); |
| | |
| | | ShowWindow(m_npHwnd2, SW_MAXIMIZE); |
| | | return 1; |
| | | } |
| | | |
| | | #endif |
| | | int OnHelp() |
| | | { |
| | | OpenWindow(L"dev:xpage[trade.help3.vx]"); |
| | |
| | | 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())); |
| | | else if (comdid.find(L"open:", 0) >= 0) OnOpen(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())); |
| | | //else if (comdid.find(L"open:", 0) >= 0) OnOpen(comdid.mid(comdid.find(L":", 0) + 1, comdid.length())); |
| | | else if (comdid == L"xmRefreshTask") |
| | | { |
| | | SendMessage(m_startwin, 0x401, comdid, 0); |
| | | SendMessage(m_startwin, 0x401, (WPARAM)comdid.c_str(), 0); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | |
| | | if (cursheet != mainsheet.GetSheetIndex()) |
| | | { |
| | | int hPicture = FindWindowEx(0, 0, L"XFrameWndClass", L"__ProductPicture"); |
| | | if (hPicture > 0) |
| | | HWND hPicture = FindWindowEx(0, 0, L"XFrameWndClass", L"__ProductPicture"); |
| | | if (hPicture) |
| | | { |
| | | int WM_CLOSE = 0x0010; |
| | | PostMessage(hPicture, WM_CLOSE, 0, 0); |
| | |
| | | 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) |
| | |
| | | int WINAPI DestroyWindow(HWND hWnd) ;//native from "user32.dll" alias "DestroyWindow"; |
| | | HMENU WINAPI CreatePopupMenu() ;//native from "user32.dll" alias "CreatePopupMenu"; |
| | | bool WINAPI AppendMenuW(HMENU hMenu, int uFlags, int uIDNewltem, string lpNewltem) ;//native from "user32.dll" alias "AppendMenuW"; |
| | | bool WINAPI TrackPopupMenu(HMENU hMenu, int uFlags, int x, int y, int nReserved, HWND hWnd, xrect prcRect) ;//native from "user32.dll" alias "TrackPopupMenu"; |
| | | bool WINAPI TrackPopupMenu(HMENU hMenu, int uFlags, int x, int y, int nReserved, HWND hWnd, LPRECT prcRect) ;//native from "user32.dll" alias "TrackPopupMenu"; |
| | | //int WINAPI CallWindowProc(int OldWProc,HWND hWnd,int uMsg,param wParam,param lParam) ;//native from "user32.dll" alias "CallWindowProcW"; |
| | | int WINAPI InvalidateRect(HWND hWnd,xrect * lpRect, bool bErase) ;//native from "user32.dll" alias "InvalidateRect"; |
| | | int WINAPI Sleep(int dwMilliseconds) ;//native from "kernel32.dll" alias "Sleep"; |
| | |
| | | #define PathRemoveFileSpec PathRemoveFileSpecW |
| | | #define SetWindowText SetWindowTextW |
| | | #define GetWindowText GetWindowTextW |
| | | #define AppendMenu AppendMenuW |
| | | #define FindWindowEx FindWindowExW |
| | | #endif |
| | | |
| | | #if 0 |