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.

191 lines
4.4 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File:
  4. // clipbrd.h
  5. //
  6. // Contents:
  7. //
  8. // Classes:
  9. // CClipDataObject
  10. //
  11. // Functions:
  12. //
  13. // History:
  14. // 17/05/94 - AlexGo - added OleOpenClipboard
  15. // 16/03/94 - AlexGo - modified for the rewritten clipboard code.
  16. // 12/08/93 - ChrisWe - continue with file cleanup
  17. // 12/06/93 - ChrisWe - began file cleanup
  18. //
  19. //-----------------------------------------------------------------------------
  20. #ifndef _CLIPBRD_H_
  21. #define _CLIPBRD_H_
  22. // WindowMessage for Delayed DropTarget Marshaling.
  23. const UINT WM_OLE_CLIPBRD_MARSHALDROPTARGET = (WM_USER + 0);
  24. //+----------------------------------------------------------------------------
  25. //
  26. // Function:
  27. // ClipboardInitialize, internal
  28. //
  29. // Synopsis:
  30. // Initialize the use of the clipboard.
  31. //
  32. // Effects:
  33. // Registers a window class CLIPBRDWNDCLASS.
  34. //
  35. // Arguments:
  36. // none
  37. //
  38. // Returns:
  39. // TRUE for success; FALSE other wise
  40. //
  41. // Notes:
  42. //
  43. // History:
  44. // 12/06/93 - ChrisWe - file inspection and cleanup
  45. //
  46. //-----------------------------------------------------------------------------
  47. BOOL ClipboardInitialize(void);
  48. //+----------------------------------------------------------------------------
  49. //
  50. // Function:
  51. // ClipboardUninitialize, internal
  52. //
  53. // Synopsis:
  54. // Terminates use of the clipboard by OLE, freeing associated
  55. // resources.
  56. //
  57. // Effects:
  58. // If this is the last reference, unregisters the clipboard
  59. // window class.
  60. //
  61. // Arguments:
  62. // none
  63. //
  64. // Notes:
  65. //
  66. // History:
  67. // 12/06/93 - ChrisWe - file inspection and cleanup
  68. //
  69. //-----------------------------------------------------------------------------
  70. void ClipboardUninitialize(void);
  71. // flags used for GetPrivateClipboardWindow
  72. typedef enum tagCLIPWINDOWFLAGS
  73. {
  74. CLIP_QUERY = 0,
  75. CLIP_CREATEIFNOTTHERE = 1
  76. } CLIPWINDOWFLAGS;
  77. //+-------------------------------------------------------------------------
  78. //
  79. // Function: GetPrivateClipboardWindow
  80. //
  81. // Synopsis: Retrieves (creates if necessary) the private clipboard
  82. // window associated with the current apartment (thread)
  83. //
  84. // Effects:
  85. //
  86. // Arguments: fCreate -- if TRUE and no window currently exists,
  87. // create one
  88. //
  89. // Requires:
  90. //
  91. // Returns: HWND
  92. //
  93. // Signals:
  94. //
  95. // Modifies:
  96. //
  97. // Algorithm: see description in the code (clipapi.cpp)
  98. //
  99. // History: dd-mmm-yy Author Comment
  100. // 16-Mar-94 alexgo author
  101. //
  102. // Notes:
  103. //
  104. //--------------------------------------------------------------------------
  105. HWND GetPrivateClipboardWindow( CLIPWINDOWFLAGS fFlags );
  106. //+-------------------------------------------------------------------------
  107. //
  108. // Function: OleOpenClipboard (internal)
  109. //
  110. // Synopsis: Opens the clipboard
  111. //
  112. // Effects:
  113. //
  114. // Arguments: [hClipWnd] -- open the clipboard with this window
  115. // may be NULL.
  116. // [phClipWnd] -- where to put the clipboard owner
  117. // may be NULL
  118. //
  119. // Requires:
  120. //
  121. // Returns: NOERROR: the clipboard was opened successfully
  122. // CLIPBRD_E_CANT_OPEN: could not open the clipboard
  123. //
  124. // Signals:
  125. //
  126. // Modifies:
  127. //
  128. // Algorithm:
  129. //
  130. // History: dd-mmm-yy Author Comment
  131. // 17-May-94 alexgo author
  132. //
  133. // Notes:
  134. //
  135. //--------------------------------------------------------------------------
  136. HRESULT OleOpenClipboard( HWND hClipWnd, HWND *phClipWnd );
  137. //+-------------------------------------------------------------------------
  138. //
  139. // Function: ClipSetCaptureForDrag
  140. //
  141. // Synopsis: Sets mouse capture mode for a drag operation
  142. //
  143. // Arguments: [pdrgop] - pointer to object that handles drag operation
  144. //
  145. // Returns: S_OK -- it worked
  146. // E_FAIL -- unexpected failure occurred.
  147. //
  148. // Algorithm: see description in the code (clipapi.cpp)
  149. //
  150. // History: dd-mmm-yy Author Comment
  151. // 21-Apr-94 ricksa created
  152. //
  153. //--------------------------------------------------------------------------
  154. class CDragOperation; // Forward declaration for circular dependencies
  155. HRESULT ClipSetCaptureForDrag(CDragOperation *pdrgop);
  156. //+-------------------------------------------------------------------------
  157. //
  158. // Function: ClipReleaseCaptureForDrag
  159. //
  160. // Synopsis: Clean up drag mouse capture
  161. //
  162. // Algorithm: see description in the code (clipapi.cpp)
  163. //
  164. // History: dd-mmm-yy Author Comment
  165. // 21-Apr-94 ricksa created
  166. //
  167. //--------------------------------------------------------------------------
  168. void ClipReleaseCaptureForDrag(void);
  169. #endif // _CLIPBRD_H_
  170. 
  171.