Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
5.6 KiB

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