COleUpdateDialog Class

Used for a special case of the OLE Edit Links dialog box, which should be used when you need to update only existing linked or embedded objects in a document.

Syntax

class COleUpdateDialog : public COleLinksDialog

Members

Public Constructors

Name Description
COleUpdateDialog::COleUpdateDialog Constructs a COleUpdateDialog object.

Public Methods

Name Description
COleUpdateDialog::DoModal Displays the Edit Links dialog box in an update mode.

Remarks

For more information regarding OLE-specific dialog boxes, see the article Dialog Boxes in OLE.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CDialog

CCommonDialog

COleDialog

COleLinksDialog

COleUpdateDialog

Requirements

Header: afxodlgs.h

COleUpdateDialog::COleUpdateDialog

Constructs a COleUpdateDialog object.

explicit COleUpdateDialog(
    COleDocument* pDoc,
    BOOL bUpdateLinks = TRUE,
    BOOL bUpdateEmbeddings = FALSE,
    CWnd* pParentWnd = NULL);

Parameters

pDoc
Points to the document containing the links that may need updating.

bUpdateLinks
Flag that determines whether linked objects are to be updated.

bUpdateEmbeddings
Flag that determines whether embedded objects are to be updated.

pParentWnd
Points to the parent or owner window object (of type CWnd) to which the dialog object belongs. If it is NULL, the parent window of the dialog box will be set to the main application window.

Remarks

This function constructs only a COleUpdateDialog object. To display the dialog box, call DoModal. This class should be used instead of COleLinksDialog when you want to update only existing linked or embedded items.

COleUpdateDialog::DoModal

Displays the Edit Links dialog box in update mode.

virtual INT_PTR DoModal();

Return Value

Completion status for the dialog box. One of the following values:

  • IDOK if the dialog box returned successfully.

  • IDCANCEL if none of the linked or embedded items in the current document need updating.

  • IDABORT if an error occurred. If IDABORT is returned, call the COleDialog::GetLastError member function to get more information about the type of error that occurred. For a listing of possible errors, see the OleUIEditLinks function in the Windows SDK.

Remarks

All links and/or embeddings are updated unless the user selects the Cancel button.

See also

MFC Sample OCLIENT
COleLinksDialog Class
Hierarchy Chart
COleLinksDialog Class