The OLEUIPASTESPECIAL structure contains information that the OLE 2.01 User Interface Library uses to initialize the Paste Special dialog box, as well as space for the library to return information when the dialog is dismissed.

typedef struct tagOLEUIPASTESPECIAL


// These IN fields are standard across all OLEUI dialog functions. DWORD cbStruct;

DWORD dwFlags;

HWND hWndOwner;

LPCSTR lpszCaption;


LPARAM lCustData;

HINSTANCE hInstance;

LPCSTR lpszTemplate;

HRSRC hResource;




int cPasteEntries;

UINT FAR * arrLinkTypes;

int cLinkTypes;

UINT cClsidExclude;

LPCLSID lpClsidExclude;

int nSelectedIndex;

BOOL fLink;

HGLOBAL hMetaPict;

SIZEL sizel;




The size of the structure, in bytes. This field must be filled on input.


On input, dwFlags specifies the initialization and creation flags. On exit, it specifies the user's choices. It may be a combination of the following flags:


Specifies that the dialog will display a Help button.


Selects the Paste radio button at dialog startup. This is the default, if PSF_SELECTPASTE or PSF_SELECTPASTELINK are not specified. Also, it specifies the state of the button on dialog termination. IN/OUT flag.


Selects the PasteLink radio button at dialog startup. Also, specifies the state of the button on dialog termination. IN/OUT flag.


Specifies whether the Display As Icon radio button was checked on dialog termination. OUT flag.


Specifies that the Display As Icon check box will be disabled on initialization.


Used to disable the change-icon button in the dialog, which is available to users when they're pasting an OLE object by default. See STAYONCLIPBOARDCHANGE otherwise.


Used to tell the dialog to stay up if the clipboard changes while the dialog is up. If the user switches to another application and copies or cuts something, the dialog will, by default, perform a cancel operation, which will remove the dialog since the options it's in the middle of presenting to the user are no longer up-to-date with respect to what's really on the clipboard.


Used in conjunction with STAYONCLIPBOARDCHANGE (it doesn't do anything otherwise). If the clipboard changes while the dialog box is up and STAYONCLIPBOARDCHANGE is specified, then NOREFRESHDATAOBJECT indicates that the dialog should NOT refresh the contents of the dialog to reflect the new contents of the clipboard. This is useful if the application is using the paste-special dialog on an IDataObject besides the one on the clipboard, for example, as part of right-mouse drag/drop operation.


Identifies the window that owns the dialog box. It should not be NULL.


Points to a string to be used as the title of the dialog box. If NULL, then the library uses Paste Special.


Points to a hook function that processes messages intended for the dialog box. The hook function must return zero to pass a message that it didn't process back to the dialog box procedure in the library. The hook function must return a non zero value to prevent the library's dialog box procedure from processing a message it has already processed.


Specifies application-defined data that the library passes to the hook function pointed to by the lpfnHook member. The library passes a pointer to the OLEUIPASTESPECIAL structure in the lParam parameter of the WM_INITDIALOG message; this pointer can be used to retrieve the lCustData member.


Identifies a instance that contains a dialog box template specified by the lpTemplateName member.


Points to a null-terminated string that specifies the name of the resource file for the dialog box template that is to be substituted for the library's Paste Special dialog box template.


Customized template handle.


The source IDataObject* (on the clipboard) for data to paste. This field is filled on input. If lpSrcDataObj is NULL when OleUIPasteSpecial is called, then OleUIPasteSpecial will attempt to retrieve a pointer to an IDataObject from the clipboard. If OleUIPasteSpecial succeeds, it is the caller's responsibility to free the IDataObject returned in lpSrcDataObj.


The OLEUIPASTEENTRY array which specifies acceptable formats. This field is filled on input.


The number of OLEUIPASTEENTRY array entries. This field is filled on input.


A list of link types that are acceptable. Link types are referred to using OLEUIPASTEFLAG in arrPasteEntries. This field is filled on input.


The number of link types. This field is filled on input.


The number of CLSIDs in lpClsidExclude. This field is filled on input.


An array of CLSIDs to exclude from the list of available server objects for a Paste operation. Note that this does not affect Paste Link. An application can prevent embedding into itself by listing its own CLSID in this list. This field is filled on input.


Index of arrPasteEntries[] that the user selected. This field is filled on output.


Indicates whether Paste or Paste Link was selected by the user. This field is filled on output.


The handle to the Metafile containing the icon and icon title selected by the user. This field is filled on output.


The size of object as displayed in its source, if the display aspect chosen by the user matches the aspect displayed in the source. If the user chooses a different aspect, then sizel.cx and sizel.cy are both set to zero. The size of the object as it is displayed in the source is retrieved from the ObjectDescriptor if fLink is FALSE and from the LinkSrcDescriptor if fLink is TRUE. This field is filled on output.

See Also


Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database