OLEUIPASTESPECIAL

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;

LPFNOLEUIHOOK lpfnHook;

LPARAM lCustData;

HINSTANCE hInstance;

LPCSTR lpszTemplate;

HRSRC hResource;

// Specifics for OLEUIPASTESPECIAL.

LPDATAOBJECT lpSrcDataObj;

LPOLEUIPASTEENTRY arrPasteEntries;

int cPasteEntries;

UINT FAR * arrLinkTypes;

int cLinkTypes;

UINT cClsidExclude;

LPCLSID lpClsidExclude;

int nSelectedIndex;

BOOL fLink;

HGLOBAL hMetaPict;

SIZEL sizel;

} OLEUIPASTESPECIAL, *POLEUIPASTESPECIAL, FAR *LPOLEUIPASTESPECIAL;

Members

cbStruct

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

dwFlags

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:

PSF_SHOWHELP

Specifies that the dialog will display a Help button.

PSF_SELECTPASTE

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.

PSF_SELECTPASTELINK

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

PSF_CHECKDISPLAYASICON

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

PSF_DISABLEDISPLAYASICON

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

HIDECHANGEICON

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.

STAYONCLIPBOARDCHANGE

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.

NOREFRESHDATAOBJECT

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.

hWndOwner

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

lpszCaption

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

lpfnHook

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.

lCustData

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.

hInstance

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

lpszTemplate

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.

hResource

Customized template handle.

lpsrcDataObj

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.

arrPasteEntries

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

cPasteEntries

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

arrLinkTypes

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

cLinkTypes

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

cClsidExclude

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

lpClsidExclude

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.

nSelectedIndex

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

fLink

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

hMetaPict

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

sizel

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

OleUIPasteSpecial
, OLEUIPASTEENTRY, OLEUIPASTEFLAG

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