|
|
1.1 root 1: /*
2: * PASTESPL.H
3: *
4: * Internal definitions, structures, and function prototypes for the
5: * OLE 2.0 UI Paste Special dialog.
6: *
7: * Copyright (c)1992 Microsoft Corporation, All Right Reserved
8: */
9:
10: #ifndef _PASTESPL_H_
11: #define _PASTESPL_H_
12:
13: #ifndef RC_INVOKED
14: #pragma message ("INCLUDING PASTESPL.H from " __FILE__)
15: #endif /* RC_INVOKED */
16:
17:
18: // Length of buffers to hold the strings 'Unknown Type', Unknown Source'
19: // and 'the application which created it'
20: #define PS_UNKNOWNSTRLEN 100
21:
22: //Property label used to store clipboard viewer chain information
23: #define NEXTCBVIEWER "NextCBViewer"
24:
25: //Internally used structure
26: typedef struct tagPASTESPECIAL
27: {
28: //Keep this item first as the Standard* functions depend on it here.
29: LPOLEUIPASTESPECIAL lpOPS; //Original structure passed.
30:
31: /*
32: * What we store extra in this structure besides the original caller's
33: * pointer are those fields that we need to modify during the life of
34: * the dialog but that we don't want to change in the original structure
35: * until the user presses OK.
36: */
37:
38: DWORD dwFlags; // Local copy of paste special flags
39:
40: int nPasteListCurSel; // Save the selection the user made last
41: int nPasteLinkListCurSel; // in the paste and pastelink lists
42: int nSelectedIndex; // Index in arrPasteEntries[] corresponding to user selection
43: BOOL fLink; // Indicates if Paste or PasteLink was selected by user
44:
45: HGLOBAL hBuff; // Scratch Buffer for building up strings
46: char szUnknownType[PS_UNKNOWNSTRLEN]; // Buffer for 'Unknown Type' string
47: char szUnknownSource[PS_UNKNOWNSTRLEN]; // Buffer for 'Unknown Source' string
48: char szAppName[OLEUI_CCHKEYMAX]; // Application name of Source. Used in the result text
49: // when Paste is selected. Obtained using clsidOD.
50:
51: // Information obtained from OBJECTDESCRIPTOR. This information is accessed when the Paste
52: // radio button is selected.
53: CLSID clsidOD; // ClassID of source
54: LPSTR szFullUserTypeNameOD; // Full User Type Name
55: LPSTR szSourceOfDataOD; // Source of Data
56: BOOL fSrcAspectIconOD; // Does Source specify DVASPECT_ICON?
57: BOOL fSrcOnlyIconicOD; // Does Source specify OLEMISC_ONLYICONIC?
58: HGLOBAL hMetaPictOD; // Metafile containing icon and icon title
59: HGLOBAL hObjDesc; // Handle to OBJECTDESCRIPTOR structure from which the
60: // above information is obtained
61:
62: // Information obtained from LINKSRCDESCRIPTOR. This infomation is accessed when the PasteLink
63: // radio button is selected.
64: CLSID clsidLSD; // ClassID of source
65: LPSTR szFullUserTypeNameLSD;// Full User Type Name
66: LPSTR szSourceOfDataLSD; // Source of Data
67: BOOL fSrcAspectIconLSD; // Does Source specify DVASPECT_ICON?
68: BOOL fSrcOnlyIconicLSD; // Does Source specify OLEMISC_ONLYICONIC?
69: HGLOBAL hMetaPictLSD; // Metafile containing icon and icon title
70: HGLOBAL hLinkSrcDesc; // Handle to LINKSRCDESCRIPTOR structure from which the
71: // above information is obtained
72:
73: } PASTESPECIAL, *PPASTESPECIAL, FAR *LPPASTESPECIAL;
74:
75: // Data corresponding to each list item. A pointer to this structure is attached to each
76: // Paste\PasteLink list box item using LB_SETITEMDATA
77: typedef struct tagPASTELISTITEMDATA
78: {
79: int nPasteEntriesIndex; // Index of arrPasteEntries[] corresponding to list item
80: BOOL fCntrEnableIcon; // Does calling application (called container here)
81: // specify OLEUIPASTE_ENABLEICON for this item?
82: } PASTELISTITEMDATA, *PPASTELISTITEMDATA, FAR *LPPASTELISTITEMDATA;
83:
84:
85: //Internal function prototypes
86: //PASTESPL.C
87: BOOL CALLBACK EXPORT PasteSpecialDialogProc(HWND, UINT, WPARAM, LPARAM);
88: BOOL FPasteSpecialInit(HWND hDlg, WPARAM, LPARAM);
89: BOOL FTogglePasteType(HWND, LPPASTESPECIAL, DWORD);
90: void ChangeListSelection(HWND, LPPASTESPECIAL, HWND);
91: void EnableDisplayAsIcon(HWND, LPPASTESPECIAL);
92: void ToggleDisplayAsIcon(HWND, LPPASTESPECIAL);
93: void ChangeIcon(HWND, LPPASTESPECIAL);
94: void SetPasteSpecialHelpResults(HWND, LPPASTESPECIAL);
95: BOOL FAddPasteListItem(HWND, BOOL, int, LPPASTESPECIAL, LPMALLOC, LPSTR);
96: BOOL FFillPasteList(HWND, LPPASTESPECIAL);
97: BOOL FFillPasteLinkList(HWND, LPPASTESPECIAL);
98: BOOL FHasPercentS(LPCSTR, LPPASTESPECIAL);
99: HGLOBAL AllocateScratchMem(LPPASTESPECIAL);
100: void FreeListData(HWND);
101:
102: #endif //_PASTESPL_H_
103:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.