OleCtl.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:22k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // olectl.h     OLE Control interfaces
  4. //
  5. //              OLE Version 2.0
  6. //
  7. //              Copyright (c) Microsoft Corporation. All rights reserved.
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _OLECTL_H_
  11. #define _OLECTL_H_
  12. #if !defined(__MKTYPLIB__) && !defined(__midl)
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #if defined(_MAC)
  17. #include <macocidl.h>
  18. #else // not _MAC
  19. #if !defined(RC_INVOKED)
  20. #include <pshpack8.h>
  21. #endif
  22. #include <ocidl.h>
  23. #endif // _MAC
  24. #ifdef _OLEAUT32_
  25. #define WINOLECTLAPI        STDAPI
  26. #define WINOLECTLAPI_(type) STDAPI_(type)
  27. #else
  28. #define WINOLECTLAPI        EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  29. #define WINOLECTLAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  30. #endif
  31. #if !defined(INITGUID)
  32. DEFINE_GUID(IID_IPropertyFrame,
  33. 0xB196B28A,0xBAB4,0x101A,0xB6,0x9C,0x00,0xAA,0x00,0x34,0x1D,0x07);
  34. //
  35. //  Class IDs for property sheet implementations
  36. //
  37. DEFINE_GUID(CLSID_CFontPropPage,
  38. 0x0be35200,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
  39. DEFINE_GUID(CLSID_CColorPropPage,
  40. 0x0be35201,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
  41. DEFINE_GUID(CLSID_CPicturePropPage,
  42. 0x0be35202,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
  43. //
  44. //  Class IDs for persistent property set formats
  45. //
  46. DEFINE_GUID(CLSID_PersistPropset,
  47. 0xfb8f0821,0x0164,0x101b,0x84,0xed,0x08,0x00,0x2b,0x2e,0xc7,0x13);
  48. DEFINE_GUID(CLSID_ConvertVBX,
  49. 0xfb8f0822,0x0164,0x101b,0x84,0xed,0x08,0x00,0x2b,0x2e,0xc7,0x13);
  50. //
  51. //  Class ID for standard implementations of IFont and IPicture
  52. DEFINE_GUID(CLSID_StdFont,
  53. 0x0be35203,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
  54. DEFINE_GUID(CLSID_StdPicture,
  55. 0x0be35204,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
  56. //
  57. //  GUIDs for standard types
  58. //
  59. DEFINE_GUID(GUID_HIMETRIC,
  60. 0x66504300,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  61. DEFINE_GUID(GUID_COLOR,
  62. 0x66504301,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  63. DEFINE_GUID(GUID_XPOSPIXEL,
  64. 0x66504302,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  65. DEFINE_GUID(GUID_YPOSPIXEL,
  66. 0x66504303,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  67. DEFINE_GUID(GUID_XSIZEPIXEL,
  68. 0x66504304,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  69. DEFINE_GUID(GUID_YSIZEPIXEL,
  70. 0x66504305,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  71. DEFINE_GUID(GUID_XPOS,
  72. 0x66504306,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  73. DEFINE_GUID(GUID_YPOS,
  74. 0x66504307,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  75. DEFINE_GUID(GUID_XSIZE,
  76. 0x66504308,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  77. DEFINE_GUID(GUID_YSIZE,
  78. 0x66504309,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  79. #if !defined( __CGUID_H__ )
  80. DEFINE_GUID(GUID_TRISTATE,
  81. 0x6650430A,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  82. #endif
  83. DEFINE_GUID(GUID_OPTIONVALUEEXCLUSIVE,
  84. 0x6650430B,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  85. DEFINE_GUID(GUID_CHECKVALUEEXCLUSIVE,
  86. 0x6650430C,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  87. DEFINE_GUID(GUID_FONTNAME,
  88. 0x6650430D,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  89. DEFINE_GUID(GUID_FONTSIZE,
  90. 0x6650430E,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  91. DEFINE_GUID(GUID_FONTBOLD,
  92. 0x6650430F,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  93. DEFINE_GUID(GUID_FONTITALIC,
  94. 0x66504310,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  95. DEFINE_GUID(GUID_FONTUNDERSCORE,
  96. 0x66504311,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  97. DEFINE_GUID(GUID_FONTSTRIKETHROUGH,
  98. 0x66504312,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  99. DEFINE_GUID(GUID_HANDLE,
  100. 0x66504313,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
  101. #endif // INITGUID
  102. /////////////////////////////////////////////////////////////////////////////
  103. // OCPFIPARAMS structure - parameters for OleCreatePropertyFrameIndirect
  104. typedef struct tagOCPFIPARAMS
  105. {
  106.     ULONG cbStructSize;
  107.     HWND hWndOwner;
  108.     int x;
  109.     int y;
  110.     LPCOLESTR lpszCaption;
  111.     ULONG cObjects;
  112.     LPUNKNOWN FAR* lplpUnk;
  113.     ULONG cPages;
  114.     CLSID FAR* lpPages;
  115.     LCID lcid;
  116.     DISPID dispidInitialProperty;
  117. } OCPFIPARAMS, FAR* LPOCPFIPARAMS;
  118. /////////////////////////////////////////////////////////////////////////////
  119. // FONTDESC structure
  120. #define FONTSIZE(n) { n##0000, 0 }
  121. typedef struct tagFONTDESC
  122. {
  123.     UINT cbSizeofstruct;
  124.     LPOLESTR lpstrName;
  125.     CY cySize;
  126.     SHORT sWeight;
  127.     SHORT sCharset;
  128.     BOOL fItalic;
  129.     BOOL fUnderline;
  130.     BOOL fStrikethrough;
  131. } FONTDESC, FAR* LPFONTDESC;
  132. /////////////////////////////////////////////////////////////////////////////
  133. // PICTDESC structure
  134. #define PICTYPE_UNINITIALIZED (-1)
  135. #define PICTYPE_NONE            0
  136. #define PICTYPE_BITMAP          1
  137. #define PICTYPE_METAFILE        2
  138. #define PICTYPE_ICON            3
  139. #ifdef _WIN32
  140. #define PICTYPE_ENHMETAFILE     4
  141. #endif
  142. typedef struct tagPICTDESC
  143. {
  144.     UINT cbSizeofstruct;
  145.     UINT picType;
  146.     union
  147.     {
  148.         struct
  149.         {
  150.             HBITMAP   hbitmap;        // Bitmap
  151.             HPALETTE  hpal;           // Accompanying palette
  152.         } bmp;
  153.         struct
  154.         {
  155.             HMETAFILE hmeta;          // Metafile
  156.             int       xExt;
  157.             int       yExt;           // Extent
  158.         } wmf;
  159.         struct
  160.         {
  161.             HICON hicon;              // Icon
  162.         } icon;
  163. #ifdef _WIN32
  164.         struct
  165.         {
  166.             HENHMETAFILE hemf;        // Enhanced Metafile
  167.         } emf;
  168. #endif
  169.     };
  170. } PICTDESC, FAR* LPPICTDESC;
  171. /////////////////////////////////////////////////////////////////////////////
  172. // Typedefs for standard scalar types
  173. typedef long OLE_XPOS_PIXELS;
  174. typedef long OLE_YPOS_PIXELS;
  175. typedef long OLE_XSIZE_PIXELS;
  176. typedef long OLE_YSIZE_PIXELS;
  177. typedef float OLE_XPOS_CONTAINER;
  178. typedef float OLE_YPOS_CONTAINER;
  179. typedef float OLE_XSIZE_CONTAINER;
  180. typedef float OLE_YSIZE_CONTAINER;
  181. typedef enum { triUnchecked = 0, triChecked = 1, triGray = 2 } OLE_TRISTATE;
  182. typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
  183. typedef VARIANT_BOOL OLE_CANCELBOOL;
  184. typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
  185. /////////////////////////////////////////////////////////////////////////////
  186. // FACILITY_CONTROL status codes
  187. #ifndef FACILITY_CONTROL
  188. #define FACILITY_CONTROL 0xa
  189. #endif
  190. #define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
  191. #define CTL_E_ILLEGALFUNCTIONCALL       STD_CTL_SCODE(5)
  192. #define CTL_E_OVERFLOW                  STD_CTL_SCODE(6)
  193. #define CTL_E_OUTOFMEMORY               STD_CTL_SCODE(7)
  194. #define CTL_E_DIVISIONBYZERO            STD_CTL_SCODE(11)
  195. #define CTL_E_OUTOFSTRINGSPACE          STD_CTL_SCODE(14)
  196. #define CTL_E_OUTOFSTACKSPACE           STD_CTL_SCODE(28)
  197. #define CTL_E_BADFILENAMEORNUMBER       STD_CTL_SCODE(52)
  198. #define CTL_E_FILENOTFOUND              STD_CTL_SCODE(53)
  199. #define CTL_E_BADFILEMODE               STD_CTL_SCODE(54)
  200. #define CTL_E_FILEALREADYOPEN           STD_CTL_SCODE(55)
  201. #define CTL_E_DEVICEIOERROR             STD_CTL_SCODE(57)
  202. #define CTL_E_FILEALREADYEXISTS         STD_CTL_SCODE(58)
  203. #define CTL_E_BADRECORDLENGTH           STD_CTL_SCODE(59)
  204. #define CTL_E_DISKFULL                  STD_CTL_SCODE(61)
  205. #define CTL_E_BADRECORDNUMBER           STD_CTL_SCODE(63)
  206. #define CTL_E_BADFILENAME               STD_CTL_SCODE(64)
  207. #define CTL_E_TOOMANYFILES              STD_CTL_SCODE(67)
  208. #define CTL_E_DEVICEUNAVAILABLE         STD_CTL_SCODE(68)
  209. #define CTL_E_PERMISSIONDENIED          STD_CTL_SCODE(70)
  210. #define CTL_E_DISKNOTREADY              STD_CTL_SCODE(71)
  211. #define CTL_E_PATHFILEACCESSERROR       STD_CTL_SCODE(75)
  212. #define CTL_E_PATHNOTFOUND              STD_CTL_SCODE(76)
  213. #define CTL_E_INVALIDPATTERNSTRING      STD_CTL_SCODE(93)
  214. #define CTL_E_INVALIDUSEOFNULL          STD_CTL_SCODE(94)
  215. #define CTL_E_INVALIDFILEFORMAT         STD_CTL_SCODE(321)
  216. #define CTL_E_INVALIDPROPERTYVALUE      STD_CTL_SCODE(380)
  217. #define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
  218. #define CTL_E_SETNOTSUPPORTEDATRUNTIME  STD_CTL_SCODE(382)
  219. #define CTL_E_SETNOTSUPPORTED           STD_CTL_SCODE(383)
  220. #define CTL_E_NEEDPROPERTYARRAYINDEX    STD_CTL_SCODE(385)
  221. #define CTL_E_SETNOTPERMITTED           STD_CTL_SCODE(387)
  222. #define CTL_E_GETNOTSUPPORTEDATRUNTIME  STD_CTL_SCODE(393)
  223. #define CTL_E_GETNOTSUPPORTED           STD_CTL_SCODE(394)
  224. #define CTL_E_PROPERTYNOTFOUND          STD_CTL_SCODE(422)
  225. #define CTL_E_INVALIDCLIPBOARDFORMAT    STD_CTL_SCODE(460)
  226. #define CTL_E_INVALIDPICTURE            STD_CTL_SCODE(481)
  227. #define CTL_E_PRINTERERROR              STD_CTL_SCODE(482)
  228. #define CTL_E_CANTSAVEFILETOTEMP        STD_CTL_SCODE(735)
  229. #define CTL_E_SEARCHTEXTNOTFOUND        STD_CTL_SCODE(744)
  230. #define CTL_E_REPLACEMENTSTOOLONG       STD_CTL_SCODE(746)
  231. #define CUSTOM_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
  232. #define CTL_E_CUSTOM_FIRST              CUSTOM_CTL_SCODE(600)
  233. /////////////////////////////////////////////////////////////////////////////
  234. // IConnectionPoint status codes
  235. #define CONNECT_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
  236. #define CONNECT_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
  237. #define CONNECT_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  238. #define CONNECT_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  239. #define CONNECT_E_NOCONNECTION      (CONNECT_E_FIRST+0)
  240. // there is no connection for this connection id
  241. #define CONNECT_E_ADVISELIMIT       (CONNECT_E_FIRST+1)
  242. // this implementation's limit for advisory connections has been reached
  243. #define CONNECT_E_CANNOTCONNECT     (CONNECT_E_FIRST+2)
  244. // connection attempt failed
  245. #define CONNECT_E_OVERRIDDEN        (CONNECT_E_FIRST+3)
  246. // must use a derived interface to connect
  247. /////////////////////////////////////////////////////////////////////////////
  248. // DllRegisterServer/DllUnregisterServer status codes
  249. #define SELFREG_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
  250. #define SELFREG_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
  251. #define SELFREG_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  252. #define SELFREG_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  253. #define SELFREG_E_TYPELIB           (SELFREG_E_FIRST+0)
  254. // failed to register/unregister type library
  255. #define SELFREG_E_CLASS             (SELFREG_E_FIRST+1)
  256. // failed to register/unregister class
  257. /////////////////////////////////////////////////////////////////////////////
  258. // IPerPropertyBrowsing status codes
  259. #define PERPROP_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
  260. #define PERPROP_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
  261. #define PERPROP_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  262. #define PERPROP_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  263. #define PERPROP_E_NOPAGEAVAILABLE   (PERPROP_E_FIRST+0)
  264. // no page available for requested property
  265. /////////////////////////////////////////////////////////////////////////////
  266. // OLEMISC_ constants (they are also defined in the latest oleidl.h)
  267. #define OLEMISC_INVISIBLEATRUNTIME  0x00000400L
  268. #define OLEMISC_ALWAYSRUN           0x00000800L
  269. #define OLEMISC_ACTSLIKEBUTTON      0x00001000L
  270. #define OLEMISC_ACTSLIKELABEL       0x00002000L
  271. #define OLEMISC_NOUIACTIVATE        0x00004000L
  272. #define OLEMISC_ALIGNABLE           0x00008000L
  273. #define OLEMISC_SIMPLEFRAME         0x00010000L
  274. #define OLEMISC_SETCLIENTSITEFIRST  0x00020000L
  275. #define OLEMISC_IMEMODE             0x00040000L
  276. /////////////////////////////////////////////////////////////////////////////
  277. // OLEIVERB_ constants
  278. #ifndef OLEIVERB_PROPERTIES
  279. #define OLEIVERB_PROPERTIES (-7L)
  280. #endif
  281. /////////////////////////////////////////////////////////////////////////////
  282. // Variant type (VT_) tags for property sets
  283. #define VT_STREAMED_PROPSET 73  //       [P]  Stream contains a property set
  284. #define VT_STORED_PROPSET   74  //       [P]  Storage contains a property set
  285. #define VT_BLOB_PROPSET     75  //       [P]  Blob contains a property set
  286. #define VT_VERBOSE_ENUM     76  //       [P]  Enum value with text string
  287. /////////////////////////////////////////////////////////////////////////////
  288. // Variant type (VT_) tags that are just aliases for others
  289. #define VT_COLOR            VT_I4
  290. #define VT_XPOS_PIXELS      VT_I4
  291. #define VT_YPOS_PIXELS      VT_I4
  292. #define VT_XSIZE_PIXELS     VT_I4
  293. #define VT_YSIZE_PIXELS     VT_I4
  294. #define VT_XPOS_HIMETRIC    VT_I4
  295. #define VT_YPOS_HIMETRIC    VT_I4
  296. #define VT_XSIZE_HIMETRIC   VT_I4
  297. #define VT_YSIZE_HIMETRIC   VT_I4
  298. #define VT_TRISTATE         VT_I2
  299. #define VT_OPTEXCLUSIVE     VT_BOOL
  300. #define VT_FONT             VT_DISPATCH
  301. #define VT_PICTURE          VT_DISPATCH
  302. #ifdef _WIN32
  303. #define VT_HANDLE           VT_I4
  304. #else
  305. #define VT_HANDLE           VT_I2
  306. #endif
  307. /////////////////////////////////////////////////////////////////////////////
  308. // Reflected Window Message IDs
  309. #define OCM__BASE           (WM_USER+0x1c00)
  310. #define OCM_COMMAND         (OCM__BASE + WM_COMMAND)
  311. #ifdef _WIN32
  312. #define OCM_CTLCOLORBTN     (OCM__BASE + WM_CTLCOLORBTN)
  313. #define OCM_CTLCOLOREDIT    (OCM__BASE + WM_CTLCOLOREDIT)
  314. #define OCM_CTLCOLORDLG     (OCM__BASE + WM_CTLCOLORDLG)
  315. #define OCM_CTLCOLORLISTBOX (OCM__BASE + WM_CTLCOLORLISTBOX)
  316. #define OCM_CTLCOLORMSGBOX  (OCM__BASE + WM_CTLCOLORMSGBOX)
  317. #define OCM_CTLCOLORSCROLLBAR   (OCM__BASE + WM_CTLCOLORSCROLLBAR)
  318. #define OCM_CTLCOLORSTATIC  (OCM__BASE + WM_CTLCOLORSTATIC)
  319. #else
  320. #define OCM_CTLCOLOR        (OCM__BASE + WM_CTLCOLOR)
  321. #endif
  322. #define OCM_DRAWITEM        (OCM__BASE + WM_DRAWITEM)
  323. #define OCM_MEASUREITEM     (OCM__BASE + WM_MEASUREITEM)
  324. #define OCM_DELETEITEM      (OCM__BASE + WM_DELETEITEM)
  325. #define OCM_VKEYTOITEM      (OCM__BASE + WM_VKEYTOITEM)
  326. #define OCM_CHARTOITEM      (OCM__BASE + WM_CHARTOITEM)
  327. #define OCM_COMPAREITEM     (OCM__BASE + WM_COMPAREITEM)
  328. #define OCM_HSCROLL         (OCM__BASE + WM_HSCROLL)
  329. #define OCM_VSCROLL         (OCM__BASE + WM_VSCROLL)
  330. #define OCM_PARENTNOTIFY    (OCM__BASE + WM_PARENTNOTIFY)
  331. #if (WINVER >= 0x0400)
  332. #define OCM_NOTIFY            (OCM__BASE + WM_NOTIFY)
  333. #endif
  334. /////////////////////////////////////////////////////////////////////////////
  335. // Self-registration APIs (to be implemented by server DLL)
  336. STDAPI DllRegisterServer(void);
  337. STDAPI DllUnregisterServer(void);
  338. /////////////////////////////////////////////////////////////////////////////
  339. // Property frame APIs
  340. WINOLECTLAPI OleCreatePropertyFrame(HWND hwndOwner, UINT x, UINT y,
  341.     LPCOLESTR lpszCaption, ULONG cObjects, LPUNKNOWN FAR* ppUnk, ULONG cPages,
  342.     LPCLSID pPageClsID, LCID lcid, DWORD dwReserved, LPVOID pvReserved);
  343. WINOLECTLAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams);
  344. /////////////////////////////////////////////////////////////////////////////
  345. // Standard type APIs
  346. WINOLECTLAPI OleTranslateColor(OLE_COLOR clr, HPALETTE hpal,
  347.     COLORREF* lpcolorref);
  348. WINOLECTLAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid,
  349.     LPVOID FAR* lplpvObj);
  350. WINOLECTLAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid,
  351.     BOOL fOwn, LPVOID FAR* lplpvObj);
  352. WINOLECTLAPI OleLoadPicture(LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
  353.     REFIID riid, LPVOID FAR* lplpvObj);
  354. WINOLECTLAPI OleLoadPictureEx(LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
  355.     REFIID riid, DWORD xSizeDesired, DWORD ySizeDesired, DWORD dwFlags,
  356.     LPVOID FAR* lplpvObj);
  357. WINOLECTLAPI OleLoadPicturePath(  LPOLESTR  szURLorPath,
  358.   LPUNKNOWN punkCaller,
  359.   DWORD     dwReserved,
  360.   OLE_COLOR clrReserved,
  361.   REFIID    riid,
  362.   LPVOID *  ppvRet );
  363. WINOLECTLAPI OleLoadPictureFile(VARIANT varFileName,
  364.     LPDISPATCH* lplpdispPicture);
  365. WINOLECTLAPI OleLoadPictureFileEx(VARIANT varFileName,
  366.     DWORD xSizeDesired, DWORD ySizeDesired, DWORD dwFlags, LPDISPATCH* lplpdispPicture);
  367. WINOLECTLAPI OleSavePictureFile(LPDISPATCH lpdispPicture,
  368.     BSTR bstrFileName);
  369. WINOLECTLAPI_(HCURSOR) OleIconToCursor(HINSTANCE hinstExe, HICON hIcon);
  370. #define LP_DEFAULT      0x00
  371. #define LP_MONOCHROME 0x01
  372. #define LP_VGACOLOR     0x02
  373. #define LP_COLOR        0x04
  374. #if !defined(_MAC) && !defined(RC_INVOKED)
  375. #include <poppack.h>
  376. #endif
  377. #endif // !(defined(__MKTYPLIB__) && !defined(__midl))
  378. /////////////////////////////////////////////////////////////////////////////
  379. //  Standard dispatch ID constants
  380. #define DISPID_AUTOSIZE                 (-500)
  381. #define DISPID_BACKCOLOR                (-501)
  382. #define DISPID_BACKSTYLE                (-502)
  383. #define DISPID_BORDERCOLOR              (-503)
  384. #define DISPID_BORDERSTYLE              (-504)
  385. #define DISPID_BORDERWIDTH              (-505)
  386. #define DISPID_DRAWMODE                 (-507)
  387. #define DISPID_DRAWSTYLE                (-508)
  388. #define DISPID_DRAWWIDTH                (-509)
  389. #define DISPID_FILLCOLOR                (-510)
  390. #define DISPID_FILLSTYLE                (-511)
  391. #define DISPID_FONT                     (-512)
  392. #define DISPID_FORECOLOR                (-513)
  393. #define DISPID_ENABLED                  (-514)
  394. #define DISPID_HWND                     (-515)
  395. #define DISPID_TABSTOP                  (-516)
  396. #define DISPID_TEXT                     (-517)
  397. #define DISPID_CAPTION                  (-518)
  398. #define DISPID_BORDERVISIBLE            (-519)
  399. #define DISPID_APPEARANCE               (-520)
  400. #define DISPID_MOUSEPOINTER             (-521)
  401. #define DISPID_MOUSEICON                (-522)
  402. #define DISPID_PICTURE                  (-523)
  403. #define DISPID_VALID                    (-524)
  404. #define DISPID_READYSTATE               (-525)
  405. #define DISPID_LISTINDEX                (-526)
  406. #define DISPID_SELECTED                 (-527)
  407. #define DISPID_LIST                     (-528)
  408. #define DISPID_COLUMN                   (-529)
  409. #define DISPID_LISTCOUNT                (-531)
  410. #define DISPID_MULTISELECT              (-532)
  411. #define DISPID_MAXLENGTH                (-533)
  412. #define DISPID_PASSWORDCHAR             (-534)
  413. #define DISPID_SCROLLBARS               (-535)
  414. #define DISPID_WORDWRAP                 (-536)
  415. #define DISPID_MULTILINE                (-537)
  416. #define DISPID_NUMBEROFROWS             (-538)
  417. #define DISPID_NUMBEROFCOLUMNS          (-539)
  418. #define DISPID_DISPLAYSTYLE             (-540)
  419. #define DISPID_GROUPNAME                (-541)
  420. #define DISPID_IMEMODE                  (-542)
  421. #define DISPID_ACCELERATOR              (-543)
  422. #define DISPID_ENTERKEYBEHAVIOR         (-544)
  423. #define DISPID_TABKEYBEHAVIOR           (-545)
  424. #define DISPID_SELTEXT                  (-546)
  425. #define DISPID_SELSTART                 (-547)
  426. #define DISPID_SELLENGTH                (-548)
  427. #define DISPID_REFRESH                  (-550)
  428. #define DISPID_DOCLICK                  (-551)
  429. #define DISPID_ABOUTBOX                 (-552)
  430. #define DISPID_ADDITEM                  (-553)
  431. #define DISPID_CLEAR                    (-554)
  432. #define DISPID_REMOVEITEM               (-555)
  433. #define DISPID_CLICK                    (-600)
  434. #define DISPID_DBLCLICK                 (-601)
  435. #define DISPID_KEYDOWN                  (-602)
  436. #define DISPID_KEYPRESS                 (-603)
  437. #define DISPID_KEYUP                    (-604)
  438. #define DISPID_MOUSEDOWN                (-605)
  439. #define DISPID_MOUSEMOVE                (-606)
  440. #define DISPID_MOUSEUP                  (-607)
  441. #define DISPID_ERROREVENT               (-608)
  442. #define DISPID_READYSTATECHANGE         (-609)
  443. #define DISPID_CLICK_VALUE              (-610)
  444. #define DISPID_RIGHTTOLEFT              (-611)
  445. #define DISPID_TOPTOBOTTOM              (-612)
  446. #define DISPID_THIS                     (-613)
  447. #define DISPID_AMBIENT_BACKCOLOR        (-701)
  448. #define DISPID_AMBIENT_DISPLAYNAME      (-702)
  449. #define DISPID_AMBIENT_FONT             (-703)
  450. #define DISPID_AMBIENT_FORECOLOR        (-704)
  451. #define DISPID_AMBIENT_LOCALEID         (-705)
  452. #define DISPID_AMBIENT_MESSAGEREFLECT   (-706)
  453. #define DISPID_AMBIENT_SCALEUNITS       (-707)
  454. #define DISPID_AMBIENT_TEXTALIGN        (-708)
  455. #define DISPID_AMBIENT_USERMODE         (-709)
  456. #define DISPID_AMBIENT_UIDEAD           (-710)
  457. #define DISPID_AMBIENT_SHOWGRABHANDLES  (-711)
  458. #define DISPID_AMBIENT_SHOWHATCHING     (-712)
  459. #define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
  460. #define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
  461. #define DISPID_AMBIENT_AUTOCLIP         (-715)
  462. #define DISPID_AMBIENT_APPEARANCE       (-716)
  463. #define DISPID_AMBIENT_CODEPAGE         (-725)
  464. #define DISPID_AMBIENT_PALETTE          (-726)
  465. #define DISPID_AMBIENT_CHARSET          (-727)
  466. #define DISPID_AMBIENT_TRANSFERPRIORITY (-728)
  467. #define DISPID_AMBIENT_RIGHTTOLEFT      (-732)
  468. #define DISPID_AMBIENT_TOPTOBOTTOM      (-733)
  469. #define DISPID_Name                     (-800)
  470. #define DISPID_Delete                   (-801)
  471. #define DISPID_Object                   (-802)
  472. #define DISPID_Parent                   (-803)
  473. /////////////////////////////////////////////////////////////////////////////
  474. // Dispatch ID constants for font and picture types
  475. #define DISPID_FONT_NAME    0
  476. #define DISPID_FONT_SIZE    2
  477. #define DISPID_FONT_BOLD    3
  478. #define DISPID_FONT_ITALIC  4
  479. #define DISPID_FONT_UNDER   5
  480. #define DISPID_FONT_STRIKE  6
  481. #define DISPID_FONT_WEIGHT  7
  482. #define DISPID_FONT_CHARSET 8
  483. #define DISPID_FONT_CHANGED 9
  484. #define DISPID_PICT_HANDLE  0
  485. #define DISPID_PICT_HPAL    2
  486. #define DISPID_PICT_TYPE    3
  487. #define DISPID_PICT_WIDTH   4
  488. #define DISPID_PICT_HEIGHT  5
  489. #define DISPID_PICT_RENDER  6
  490. #if defined(__MKTYPLIB__) || defined(__midl)
  491. /////////////////////////////////////////////////////////////////////////////
  492. // Names of modules containing type libraries for standard types
  493. #define STDOLE_TLB "stdole2.tlb"
  494. #ifdef _WIN64
  495. #define STDTYPE_TLB "stdole2.tlb"
  496. #else
  497. #define STDTYPE_TLB "olepro32.dll"
  498. #endif
  499. #endif // defined(__MKTYPLIB__) || defined(__midl)
  500. #endif // _OLECTL_H_