Condividi tramite


COleDocument::GetPrimarySelectedItem

Called by the framework to retrieve the currently selected OLE item in the specified view.

virtual COleClientItem* GetPrimarySelectedItem(
   CView* pView 
);

Parameters

  • pView
    Pointer to the active view object displaying the document.

Return Value

A pointer to the single, selected OLE item; NULL if no OLE items are selected or if more than one is selected.

Remarks

The default implementation searches the list of contained OLE items for a single selected item and returns a pointer to it. If there is no item selected, or if there is more than one item selected, the function returns NULL. You must override the CView::IsSelected member function in your view class for this function to work. Override this function if you have your own method of storing contained OLE items.

Requirements

Header: afxole.h

See Also

Reference

COleDocument Class

Hierarchy Chart

CView::IsSelected

Other Resources

COleDocument Members