HRESULT CCompileEditView::QueryAcceptData( LPDATAOBJECT lpdataobj, CLIPFORMAT FAR * lpcfFormat, DWORD dwReco, BOOL bReally, HGLOBAL hMetaFile ) { /* ASSERT(lpcfFormat != NULL); if (!bReally) // not actually pasting return S_OK; // if direct pasting a particular native format allow it if (IsRichEditFormat(*lpcfFormat)) return S_OK; COleDataObject dataobj; dataobj.Attach(lpdataobj, FALSE); // if format is 0, then force particular formats if available if (*lpcfFormat == 0 && (m_nPasteType == 0)) { if (dataobj.IsDataAvailable((CLIPFORMAT)_oleData.cfRichTextAndObjects)) // native avail, let richedit do as it wants return S_OK; else if (dataobj.IsDataAvailable((CLIPFORMAT)_oleData.cfRichTextFormat)) { *lpcfFormat = (CLIPFORMAT)_oleData.cfRichTextFormat; return S_OK; } else if (dataobj.IsDataAvailable(CF_TEXT)) { *lpcfFormat = CF_TEXT; return S_OK; } } // paste OLE formats DoPaste(dataobj, *lpcfFormat, hMetaPict); return S_FALSE; */ OnEditProperties(); return S_FALSE; }
void CNToolSelect::OnLButtonDblClk(CNPainterView* pView, UINT nFlags, const CPoint& point) { if ((nFlags & MK_SHIFT) != 0) { // Shift+DblClk deselects object... CPoint local = point; pView->clientToDoc(local); gtc::itobj* pobj = pView->GetDocument()->objectAt(local); if (pobj != nullptr) pView->deselect(pobj); } else { // "Normal" DblClk opens properties, or OLE server... if(pView->m_vecSels.size() == 1) { OnEditProperties(pView); } /* if (pView->m_selection.GetCount() == 1) pView->m_selection.GetHead()->OnOpen(pView);*/ } CNTool::OnLButtonDblClk(pView, nFlags, point); }
void CDrawObject::OnOpen() { OnEditProperties(); }
void CDrawObj::OnOpen(CDrawView* /*pView*/ ) { OnEditProperties(); }