File:  [WindowsNT SDKs] / mstools / ole20 / samples / ole2ui / pastespl.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:24:38 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntsdk-jul-1993, HEAD
Microsoft Windows NT Build 511 (SDK Final Release) 07-24-1993

/*
 * PASTESPL.H
 *
 * Internal definitions, structures, and function prototypes for the
 * OLE 2.0 UI Paste Special dialog.
 *
 * Copyright (c)1992 Microsoft Corporation, All Right Reserved
 */

#ifndef _PASTESPL_H_
#define _PASTESPL_H_

#ifndef RC_INVOKED
#pragma message ("INCLUDING PASTESPL.H from " __FILE__)
#endif  /* RC_INVOKED */


// Length of buffers to hold the strings 'Unknown Type', Unknown Source'
//   and 'the application which created it'
#define PS_UNKNOWNSTRLEN               100

//Property label used to store clipboard viewer chain information
#define NEXTCBVIEWER        "NextCBViewer"

//Internally used structure
typedef struct tagPASTESPECIAL
{
    //Keep this item first as the Standard* functions depend on it here.
    LPOLEUIPASTESPECIAL  lpOPS;                //Original structure passed.

    /*
     * What we store extra in this structure besides the original caller's
     * pointer are those fields that we need to modify during the life of
     * the dialog but that we don't want to change in the original structure
     * until the user presses OK.
     */

    DWORD                dwFlags;              // Local copy of paste special flags

    int                  nPasteListCurSel;     // Save the selection the user made last
    int                  nPasteLinkListCurSel; //    in the paste and pastelink lists
    int                  nSelectedIndex;       // Index in arrPasteEntries[] corresponding to user selection
    BOOL                 fLink;                // Indicates if Paste or PasteLink was selected by user

    HGLOBAL              hBuff;                // Scratch Buffer for building up strings
    char                 szUnknownType[PS_UNKNOWNSTRLEN];    // Buffer for 'Unknown Type' string
    char                 szUnknownSource[PS_UNKNOWNSTRLEN];  // Buffer for 'Unknown Source' string
    char                 szAppName[OLEUI_CCHKEYMAX]; // Application name of Source. Used in the result text
                                                     //   when Paste is selected. Obtained using clsidOD.

    // Information obtained from OBJECTDESCRIPTOR. This information is accessed when the Paste
    //    radio button is selected.
    CLSID                clsidOD;              // ClassID of source
    LPSTR                szFullUserTypeNameOD; // Full User Type Name
    LPSTR                szSourceOfDataOD;     // Source of Data
    BOOL                 fSrcAspectIconOD;     // Does Source specify DVASPECT_ICON?
    BOOL                 fSrcOnlyIconicOD;     // Does Source specify OLEMISC_ONLYICONIC?
    HGLOBAL              hMetaPictOD;          // Metafile containing icon and icon title
    HGLOBAL              hObjDesc;             // Handle to OBJECTDESCRIPTOR structure from which the
                                               //   above information is obtained

    // Information obtained from LINKSRCDESCRIPTOR. This infomation is accessed when the PasteLink
    //   radio button is selected.
    CLSID                clsidLSD;             // ClassID of source
    LPSTR                szFullUserTypeNameLSD;// Full User Type Name
    LPSTR                szSourceOfDataLSD;    // Source of Data
    BOOL                 fSrcAspectIconLSD;    // Does Source specify DVASPECT_ICON?
    BOOL                 fSrcOnlyIconicLSD;    // Does Source specify OLEMISC_ONLYICONIC?
    HGLOBAL              hMetaPictLSD;         // Metafile containing icon and icon title
    HGLOBAL              hLinkSrcDesc;         // Handle to LINKSRCDESCRIPTOR structure from which the
                                               //   above information is obtained

} PASTESPECIAL, *PPASTESPECIAL, FAR *LPPASTESPECIAL;

// Data corresponding to each list item. A pointer to this structure is attached to each
//   Paste\PasteLink list box item using LB_SETITEMDATA
typedef struct tagPASTELISTITEMDATA
{
   int                   nPasteEntriesIndex;   // Index of arrPasteEntries[] corresponding to list item
   BOOL                  fCntrEnableIcon;      // Does calling application (called container here)
                                               //    specify OLEUIPASTE_ENABLEICON for this item?
} PASTELISTITEMDATA, *PPASTELISTITEMDATA, FAR *LPPASTELISTITEMDATA;


//Internal function prototypes
//PASTESPL.C
BOOL CALLBACK EXPORT PasteSpecialDialogProc(HWND, UINT, WPARAM, LPARAM);
BOOL            FPasteSpecialInit(HWND hDlg, WPARAM, LPARAM);
BOOL            FTogglePasteType(HWND, LPPASTESPECIAL, DWORD);
void            ChangeListSelection(HWND, LPPASTESPECIAL, HWND);
void            EnableDisplayAsIcon(HWND, LPPASTESPECIAL);
void            ToggleDisplayAsIcon(HWND, LPPASTESPECIAL);
void            ChangeIcon(HWND, LPPASTESPECIAL);
void            SetPasteSpecialHelpResults(HWND, LPPASTESPECIAL);
BOOL            FAddPasteListItem(HWND, BOOL, int, LPPASTESPECIAL, LPMALLOC, LPSTR);
BOOL            FFillPasteList(HWND, LPPASTESPECIAL);
BOOL            FFillPasteLinkList(HWND, LPPASTESPECIAL);
BOOL            FHasPercentS(LPCSTR, LPPASTESPECIAL);
HGLOBAL         AllocateScratchMem(LPPASTESPECIAL);
void            FreeListData(HWND);

#endif  //_PASTESPL_H_


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.