void CDlgProcessSequence::OnDblclkProcessList(NMHDR* pNMHDR, LRESULT* pResult) { HWND hWnd = pNMHDR->hwndFrom; CListCtrl* pCtrl = (CListCtrl*) CWnd::FromHandle(hWnd); POINT pointScreen; DWORD dwPos; dwPos = GetMessagePos(); pointScreen.x = LOWORD (dwPos); pointScreen.y = HIWORD (dwPos); ::MapWindowPoints(NULL, hWnd,&pointScreen, 1); CPoint pt_local(pointScreen); pt_local.x = 5; // it likes clicks on the left edge, not in the middle, so fake it UINT flags; int i = pCtrl->HitTest(pt_local, &flags) ; if(i>=0) { // could be a subclass of CWListEntry, an evironment row, or a comment row CProcess *pProc = (CProcess *) pCtrl->GetItemData(i); if(pProc) #ifndef hab231 { pProc->doEditDialog(m_iFunctionCode); populateListCtrl(); } #else // hab231 pProc->doEditDialog(m_iFunctionCode); #endif // hab231 } *pResult = 0; }
void CDlgProcessSequence::OnProperties() { // 1) figure out which process is selected CProcess* pProc = getFirstSelectedProcess(); if (!pProc) return; // 2) tell that process to put up the edit dialog if (pProc->doEditDialog(m_iFunctionCode)) { m_bModified=TRUE; // these two often don't work SetRedraw(TRUE); Invalidate(); // may have changed something that effects the display } }