diff --git a/checkin_notes b/checkin_notes index 150e29e205..d30c8cf77b 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7060,3 +7060,9 @@ Karl 2003-10-24 db/ constraints.sql +Karl 2003-10-25 + - client GUI: fixed context menu bug + + client/win/ + wingui_mainwindow.cpp + diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index fde66c0caa..fc7ba0014a 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -1861,33 +1861,22 @@ void CMainWindow::OnRButtonDown(UINT nFlags, CPoint point) int nMenuId = -1; GetCursorPos(&point); - if(m_ProjectListCtrl.IsWindowVisible()) { + int currentSelection = m_TabCtrl.GetCurSel(); + + if(currentSelection == PROJECT_ID) { pMenuCtrl = &m_ProjectListCtrl; nMenuId = PROJECT_MENU; - } else if(m_ResultListCtrl.IsWindowVisible()) { + } else if(currentSelection == RESULT_ID) { pMenuCtrl = &m_ResultListCtrl; nMenuId = RESULT_MENU; - } else if(m_XferListCtrl.IsWindowVisible()) { + } else if(currentSelection == XFER_ID) { pMenuCtrl = &m_XferListCtrl; nMenuId = XFER_MENU; - } else if(m_MessageListCtrl.IsWindowVisible()) { + } else if(currentSelection == MESSAGE_ID) { pMenuCtrl = &m_MessageListCtrl; nMenuId = MESSAGE_MENU; } - // " pMenuCtrl->OnLButtonDown(nFlags, point) " - /*{ - _AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData(); - pMenuCtrl->SendMessage(WM_LBUTTONUP, pThreadState->m_lastSentMsg.wParam, - pThreadState->m_lastSentMsg.lParam); - pMenuCtrl->SendMessage(WM_LBUTTONDOWN, pThreadState->m_lastSentMsg.wParam, - pThreadState->m_lastSentMsg.lParam); - pMenuCtrl->SendMessage(WM_LBUTTONUP, pThreadState->m_lastSentMsg.wParam, - pThreadState->m_lastSentMsg.lParam); - pMenuCtrl->SendMessage(WM_LBUTTONDOWN, nFlags, MAKELPARAM(point.x,point.y)); - }*/ - - if(pMenuCtrl) { pMenuCtrl->SetFocus(); // clear all other items - this must be done first