void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); switch (pEvent->GetClassID()) { case CFWL_EventType::SelectChanged: { CFWL_EvtSelectChanged* postEvent = static_cast<CFWL_EvtSelectChanged*>(pEvent); OnSelectChanged(m_pNormalWidget->GetWidget(), postEvent->bLButtonUp); break; } case CFWL_EventType::EditChanged: { CFX_WideString wsChanged; OnTextChanged(m_pNormalWidget->GetWidget(), wsChanged); break; } case CFWL_EventType::PreDropDown: { OnPreOpen(m_pNormalWidget->GetWidget()); break; } case CFWL_EventType::PostDropDown: { OnPostOpen(m_pNormalWidget->GetWidget()); break; } default: break; } m_pOldDelegate->OnProcessEvent(pEvent); }
FWL_ERR CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); FX_DWORD dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_CMB_SelChanged: { CFWL_EvtCmbSelChanged* postEvent = (CFWL_EvtCmbSelChanged*)pEvent; OnSelectChanged(m_pNormalWidget->GetWidget(), postEvent->iArraySels, postEvent->bLButtonUp); break; } case FWL_EVTHASH_CMB_EditChanged: { CFX_WideString wsChanged; OnTextChanged(m_pNormalWidget->GetWidget(), wsChanged); break; } case FWL_EVTHASH_CMB_PreDropDown: { OnPreOpen(m_pNormalWidget->GetWidget()); break; } case FWL_EVTHASH_CMB_PostDropDown: { OnPostOpen(m_pNormalWidget->GetWidget()); break; } default: {} } return m_pOldDelegate->OnProcessEvent(pEvent); }
void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { CFWL_EvtSelectChanged* event = static_cast<CFWL_EvtSelectChanged*>(pEvent); OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, event->iDay); return; } CXFA_FFTextEdit::OnProcessEvent(pEvent); }
FWL_ERR CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { FX_DWORD dwEventID = pEvent->GetClassID(); if (dwEventID == FWL_EVTHASH_DTP_SelectChanged) { CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, event->iDay); return TRUE; } else { return CXFA_FFTextEdit::OnProcessEvent(pEvent); } }
void CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); switch (pEvent->GetClassID()) { case CFWL_EventType::SelectChanged: { CFX_Int32Array arrSels; OnSelectChanged(m_pNormalWidget->GetWidget(), arrSels); break; } default: break; } m_pOldDelegate->OnProcessEvent(pEvent); }
FWL_ERR CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); FX_DWORD dwEventID = pEvent->GetClassID(); switch (dwEventID) { case FWL_EVTHASH_LTB_SelChanged: { CFX_Int32Array arrSels; OnSelectChanged(m_pNormalWidget->GetWidget(), arrSels); break; } default: {} } return m_pOldDelegate->OnProcessEvent(pEvent); }
void NFOView::CheckSelect(void) { static DWORD prevStart = 0; static DWORD prevEnd = 0; DWORD selStart; DWORD selEnd; SendMessage(_handle, EM_GETSEL, (WPARAM)&selStart, (LPARAM)&selEnd); if (prevStart != selStart || prevEnd != selEnd) { OnSelectChanged(); } }
BOOL CDlgReadInfo::OnInitDialog() { CAcUiDialog::OnInitDialog(); m_btnSelect.AutoLoad(); //初始化配置信息列表 //ListCtrl初始化 m_wndList.SetGridLines(); m_wndList.SetFullSelectedStyle(); m_wndList.SetExtendedStyle(LVS_EX_INFOTIP); m_wndList.SetHeadings( _T("名称,90;内容,120") ); m_wndList.SetAllowEdit(); m_wndList.SetEditTextColor(RGB(255,0,0)); m_wndList.SetEditBkColor(RGB(255,255,255)); //分割条初始化 m_wndSplitterBar.Create(WS_CHILD|WS_BORDER|WS_DLGFRAME|WS_VISIBLE, CRect(0,0,0,0), this, IDC_SPLITTERBAR); m_wndSplitterBar.SetPanes(&m_wndTree, &m_wndList); GetDlgItem(IDC_SAVE)->EnableWindow(FALSE); //读取图层信息 InitLayerList(); // 选择实体 OnBnClickedBtnSelect(); if (m_wndTree.GetCount() <= 0) { EndDialog(IDCANCEL); return FALSE; } HTREEITEM hItem = m_wndTree.GetFirstVisibleItem(); // 显示属性 OnSelectChanged(hItem); return TRUE; }
void CDlgReadInfo::OnClickObjectTree(NMHDR* pNMHDR, LRESULT* pResult) { // Get mouse position. CPoint point; ::GetCursorPos(&point); m_wndTree.ScreenToClient(&point); // Get hit item. HTREEITEM newItem = m_wndTree.HitTest(point); if (newItem == NULL) { return; } GetDlgItem(IDC_SAVE)->EnableWindow(FALSE); OnSelectChanged(newItem); AcDbObjectId ObjId; ObjId.setFromOldId(atoi(m_strCurObjectId)); FlashEntity(ObjId); }
void CMainWindow::Notify( TNotifyUI &msg ) { DUI__Trace(msg.sType); if (msg.sType==_T("windowinit")) { OnInitWindow(msg); } else if (msg.sType==_T("click")) { OnClick(msg); } else if (msg.sType==_T("selectchanged")) { OnSelectChanged(msg); } else if (msg.sType==_T("itemactivate")) { OnItemActive(msg); } else if (msg.sType==_T("itemclick")) { OnItemClick(msg); } else if (msg.sType==_T("menu")) { OnMenu(msg); } else if (msg.sType==_T("killfocus")) { OnKillFocus(msg); } else if (msg.sType==_T("return")) { OnReturn(msg); } }
void CDlgReadInfo::OnBnClickedBtnSelect() { //交互选择实体 BeginEditorCommand(); CString strCadName; CComboBox* pCmb = (CComboBox*)GetDlgItem(IDC_COMBO_CADLY); pCmb->GetLBText(pCmb->GetCurSel(),strCadName); ads_name ssName; struct resbuf *filter=NULL; if(strCadName.CompareNoCase("所有图层") != 0) { filter=acutNewRb(AcDb::kDxfLayerName); filter->restype=AcDb::kDxfLayerName; filter->resval.rstring = (char*) malloc((strCadName.GetLength()+1)*sizeof(char)); strcpy(filter->resval.rstring,strCadName.GetBuffer(0)); filter->rbnext=NULL; } if (acedSSGet(":S", NULL, NULL, filter, ssName) != RTNORM) { acutPrintf("\n选择实体有误!"); acedSSFree(ssName); acutRelRb(filter); CompleteEditorCommand(); return; } if(filter != NULL) acutRelRb(filter); AcDbObjectId tempObjId; ads_name ssTemp; long nNum = 0; int nPos = 0; acedSSLength(ssName,&nNum); CString strSdeName,strId,strRowId; m_wndTree.DeleteAllItems(); // 清空属性列表 ResetListItems(); for(int i=0; i<nNum; i++) { acedSSName(ssName, i, ssTemp); if(Acad::eOk != acdbGetObjectId(tempObjId, ssTemp)) continue; strId.Format("%d",tempObjId.asOldId()); CDistXData tempXData(tempObjId,"ROWID_OBJS"); if(tempXData.Select("SDELYNAME",strSdeName)==FALSE) continue; if(tempXData.Select("OBJECTID",strRowId)==FALSE) continue; tempXData.Close(); HTREEITEM hItem = m_wndTree.InsertItem(strId); AcDbEntity *pEnt = NULL; if (Acad::eOk != acdbOpenObject(pEnt, tempObjId, AcDb::kForRead)) { return; } pEnt->close(); ITEM_DATA xxItemData; xxItemData.strID = strId; xxItemData.strSdelayerName = strSdeName; xxItemData.strCadLayerName = pEnt->layer(); xxItemData.strRowId = strRowId; mapItemData[strId] = xxItemData; nPos++; } acedSSFree(ssName); CompleteEditorCommand(); if (m_wndTree.GetCount() <= 0) { return; } HTREEITEM hItem = m_wndTree.GetFirstVisibleItem(); // 显示属性 OnSelectChanged(hItem); }