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.

1202 lines
37 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // olectl.h OLE Custom Control interfaces
  4. //
  5. // OLE Version 2.0
  6. //
  7. // Copyright (c) 1992-1994, Microsoft Corp. All rights reserved.
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _OLECTL_H_
  11. #define _OLECTL_H_
  12. #ifndef __MKTYPLIB__
  13. // Set packing to 8
  14. #ifdef _WIN32
  15. #ifndef RC_INVOKED
  16. #pragma pack(8)
  17. #endif // not RC_INVOKED
  18. #endif // _WIN32
  19. #ifndef INITGUID
  20. #include <olectlid.h>
  21. #endif
  22. #ifndef _WIN32
  23. /////////////////////////////////////////////////////////////////////////////
  24. // Typedefs for characters and strings in interfaces
  25. typedef char OLECHAR;
  26. typedef OLECHAR FAR* LPOLESTR;
  27. typedef const OLECHAR FAR* LPCOLESTR;
  28. #endif // not _WIN32
  29. /////////////////////////////////////////////////////////////////////////////
  30. // Typedefs for TEXTMETRIC structures
  31. #if defined(_WIN32) && !defined(OLE2ANSI)
  32. typedef TEXTMETRICW TEXTMETRICOLE;
  33. #else
  34. typedef TEXTMETRIC TEXTMETRICOLE;
  35. #endif
  36. typedef TEXTMETRICOLE FAR* LPTEXTMETRICOLE;
  37. /////////////////////////////////////////////////////////////////////////////
  38. // Typedefs for interfaces
  39. #ifdef __cplusplus
  40. interface IOleControl;
  41. interface IOleControlSite;
  42. interface ISimpleFrameSite;
  43. interface IPersistStreamInit;
  44. interface IPropertyNotifySink;
  45. interface IProvideClassInfo;
  46. interface IConnectionPointContainer;
  47. interface IEnumConnectionPoints;
  48. interface IConnectionPoint;
  49. interface IEnumConnections;
  50. interface IClassFactory2;
  51. interface ISpecifyPropertyPages;
  52. interface IPerPropertyBrowsing;
  53. interface IPropertyPageSite;
  54. interface IPropertyPage;
  55. interface IPropertyPage2;
  56. interface IFont;
  57. interface IFontDisp;
  58. interface IPicture;
  59. interface IPictureDisp;
  60. #else
  61. typedef interface IOleControl IOleControl;
  62. typedef interface IOleControlSite IOleControlSite;
  63. typedef interface ISimpleFrameSite ISimpleFrameSite;
  64. typedef interface IPersistStreamInit IPersistStreamInit;
  65. typedef interface IPropertyNotifySink IPropertyNotifySink;
  66. typedef interface IProvideClassInfo IProvideClassInfo;
  67. typedef interface IConnectionPointContainer IConnectionPointContainer;
  68. typedef interface IEnumConnectionPoints IEnumConnectionPoints;
  69. typedef interface IConnectionPoint IConnectionPoint;
  70. typedef interface IEnumConnections IEnumConnections;
  71. typedef interface IClassFactory2 IClassFactory2;
  72. typedef interface ISpecifyPropertyPages ISpecifyPropertyPages;
  73. typedef interface IPerPropertyBrowsing IPerPropertyBrowsing;
  74. typedef interface IPropertyPageSite IPropertyPageSite;
  75. typedef interface IPropertyPage IPropertyPage;
  76. typedef interface IPropertyPage2 IPropertyPage2;
  77. typedef interface IFont IFont;
  78. typedef interface IFontDisp IFontDisp;
  79. typedef interface IPicture IPicture;
  80. typedef interface IPictureDisp IPictureDisp;
  81. #endif
  82. typedef IOleControl FAR* LPOLECONTROL;
  83. typedef IOleControlSite FAR* LPOLECONTROLSITE;
  84. typedef ISimpleFrameSite FAR* LPSIMPLEFRAMESITE;
  85. typedef IPersistStreamInit FAR* LPPERSISTSTREAMINIT;
  86. typedef interface IPropertyNotifySink FAR* LPPROPERTYNOTIFYSINK;
  87. typedef IProvideClassInfo FAR* LPPROVIDECLASSINFO;
  88. typedef IConnectionPointContainer FAR* LPCONNECTIONPOINTCONTAINER;
  89. typedef IEnumConnectionPoints FAR* LPENUMCONNECTIONPOINTS;
  90. typedef IConnectionPoint FAR* LPCONNECTIONPOINT;
  91. typedef IEnumConnections FAR* LPENUMCONNECTIONS;
  92. typedef IClassFactory2 FAR* LPCLASSFACTORY2;
  93. typedef ISpecifyPropertyPages FAR* LPSPECIFYPROPERTYPAGES;
  94. typedef IPerPropertyBrowsing FAR* LPPERPROPERTYBROWSING;
  95. typedef IPropertyPageSite FAR* LPPROPERTYPAGESITE;
  96. typedef IPropertyPage FAR* LPPROPERTYPAGE;
  97. typedef IPropertyPage2 FAR* LPPROPERTYPAGE2;
  98. typedef IFont FAR* LPFONT;
  99. typedef IFontDisp FAR* LPFONTDISP;
  100. typedef IPicture FAR* LPPICTURE;
  101. typedef IPictureDisp FAR* LPPICTUREDISP;
  102. /////////////////////////////////////////////////////////////////////////////
  103. // Typedefs for structs
  104. typedef struct tagPOINTF FAR* LPPOINTF;
  105. typedef struct tagCONTROLINFO FAR* LPCONTROLINFO;
  106. typedef struct tagCONNECTDATA FAR* LPCONNECTDATA;
  107. typedef struct tagLICINFO FAR* LPLICINFO;
  108. typedef struct tagCAUUID FAR* LPCAUUID;
  109. typedef struct tagCALPOLESTR FAR* LPCALPOLESTR;
  110. typedef struct tagCADWORD FAR* LPCADWORD;
  111. typedef struct tagOCPFIPARAMS FAR* LPOCPFIPARAMS;
  112. typedef struct tagPROPPAGEINFO FAR* LPPROPPAGEINFO;
  113. typedef struct tagFONTDESC FAR* LPFONTDESC;
  114. typedef struct tagPICTDESC FAR* LPPICTDESC;
  115. /////////////////////////////////////////////////////////////////////////////
  116. // Typedefs for standard scalar types
  117. typedef DWORD OLE_COLOR;
  118. typedef long OLE_XPOS_PIXELS;
  119. typedef long OLE_YPOS_PIXELS;
  120. typedef long OLE_XSIZE_PIXELS;
  121. typedef long OLE_YSIZE_PIXELS;
  122. typedef long OLE_XPOS_HIMETRIC;
  123. typedef long OLE_YPOS_HIMETRIC;
  124. typedef long OLE_XSIZE_HIMETRIC;
  125. typedef long OLE_YSIZE_HIMETRIC;
  126. typedef float OLE_XPOS_CONTAINER;
  127. typedef float OLE_YPOS_CONTAINER;
  128. typedef float OLE_XSIZE_CONTAINER;
  129. typedef float OLE_YSIZE_CONTAINER;
  130. typedef enum { triUnchecked = 0, triChecked = 1, triGray = 2 } OLE_TRISTATE;
  131. typedef BOOL OLE_OPTEXCLUSIVE;
  132. typedef BOOL OLE_CANCELBOOL;
  133. typedef BOOL OLE_ENABLEDEFAULTBOOL;
  134. typedef UINT OLE_HANDLE;
  135. /////////////////////////////////////////////////////////////////////////////
  136. // FACILITY_CONTROL status codes
  137. #ifndef FACILITY_CONTROL
  138. #define FACILITY_CONTROL 0xa
  139. #endif
  140. #define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
  141. #define CTL_E_ILLEGALFUNCTIONCALL STD_CTL_SCODE(5)
  142. #define CTL_E_OVERFLOW STD_CTL_SCODE(6)
  143. #define CTL_E_OUTOFMEMORY STD_CTL_SCODE(7)
  144. #define CTL_E_DIVISIONBYZERO STD_CTL_SCODE(11)
  145. #define CTL_E_OUTOFSTRINGSPACE STD_CTL_SCODE(14)
  146. #define CTL_E_OUTOFSTACKSPACE STD_CTL_SCODE(28)
  147. #define CTL_E_BADFILENAMEORNUMBER STD_CTL_SCODE(52)
  148. #define CTL_E_FILENOTFOUND STD_CTL_SCODE(53)
  149. #define CTL_E_BADFILEMODE STD_CTL_SCODE(54)
  150. #define CTL_E_FILEALREADYOPEN STD_CTL_SCODE(55)
  151. #define CTL_E_DEVICEIOERROR STD_CTL_SCODE(57)
  152. #define CTL_E_FILEALREADYEXISTS STD_CTL_SCODE(58)
  153. #define CTL_E_BADRECORDLENGTH STD_CTL_SCODE(59)
  154. #define CTL_E_DISKFULL STD_CTL_SCODE(61)
  155. #define CTL_E_BADRECORDNUMBER STD_CTL_SCODE(63)
  156. #define CTL_E_BADFILENAME STD_CTL_SCODE(64)
  157. #define CTL_E_TOOMANYFILES STD_CTL_SCODE(67)
  158. #define CTL_E_DEVICEUNAVAILABLE STD_CTL_SCODE(68)
  159. #define CTL_E_PERMISSIONDENIED STD_CTL_SCODE(70)
  160. #define CTL_E_DISKNOTREADY STD_CTL_SCODE(71)
  161. #define CTL_E_PATHFILEACCESSERROR STD_CTL_SCODE(75)
  162. #define CTL_E_PATHNOTFOUND STD_CTL_SCODE(76)
  163. #define CTL_E_INVALIDPATTERNSTRING STD_CTL_SCODE(93)
  164. #define CTL_E_INVALIDUSEOFNULL STD_CTL_SCODE(94)
  165. #define CTL_E_INVALIDFILEFORMAT STD_CTL_SCODE(321)
  166. #define CTL_E_INVALIDPROPERTYVALUE STD_CTL_SCODE(380)
  167. #define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
  168. #define CTL_E_SETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(382)
  169. #define CTL_E_SETNOTSUPPORTED STD_CTL_SCODE(383)
  170. #define CTL_E_NEEDPROPERTYARRAYINDEX STD_CTL_SCODE(385)
  171. #define CTL_E_SETNOTPERMITTED STD_CTL_SCODE(387)
  172. #define CTL_E_GETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(393)
  173. #define CTL_E_GETNOTSUPPORTED STD_CTL_SCODE(394)
  174. #define CTL_E_PROPERTYNOTFOUND STD_CTL_SCODE(422)
  175. #define CTL_E_INVALIDCLIPBOARDFORMAT STD_CTL_SCODE(460)
  176. #define CTL_E_INVALIDPICTURE STD_CTL_SCODE(481)
  177. #define CTL_E_PRINTERERROR STD_CTL_SCODE(482)
  178. #define CTL_E_CANTSAVEFILETOTEMP STD_CTL_SCODE(735)
  179. #define CTL_E_SEARCHTEXTNOTFOUND STD_CTL_SCODE(744)
  180. #define CTL_E_REPLACEMENTSTOOLONG STD_CTL_SCODE(746)
  181. #define CUSTOM_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
  182. #define CTL_E_CUSTOM_FIRST CUSTOM_CTL_SCODE(600)
  183. /////////////////////////////////////////////////////////////////////////////
  184. // IClassFactory2 status codes
  185. #define CLASS_E_NOTLICENSED (CLASSFACTORY_E_FIRST+2)
  186. // class is not licensed for use
  187. /////////////////////////////////////////////////////////////////////////////
  188. // IConnectionPoint status codes
  189. #define CONNECT_E_FIRST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
  190. #define CONNECT_E_LAST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x020F)
  191. #define CONNECT_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  192. #define CONNECT_S_LAST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  193. #define CONNECT_E_NOCONNECTION (CONNECT_E_FIRST+0)
  194. // there is no connection for this connection id
  195. #define CONNECT_E_ADVISELIMIT (CONNECT_E_FIRST+1)
  196. // this implementation's limit for advisory connections has been reached
  197. #define CONNECT_E_CANNOTCONNECT (CONNECT_E_FIRST+2)
  198. // connection attempt failed
  199. #define CONNECT_E_OVERRIDDEN (CONNECT_E_FIRST+3)
  200. // must use a derived interface to connect
  201. /////////////////////////////////////////////////////////////////////////////
  202. // DllRegisterServer/DllUnregisterServer status codes
  203. #define SELFREG_E_FIRST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
  204. #define SELFREG_E_LAST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x020F)
  205. #define SELFREG_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  206. #define SELFREG_S_LAST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  207. #define SELFREG_E_TYPELIB (SELFREG_E_FIRST+0)
  208. // failed to register/unregister type library
  209. #define SELFREG_E_CLASS (SELFREG_E_FIRST+1)
  210. // failed to register/unregister class
  211. /////////////////////////////////////////////////////////////////////////////
  212. // IPerPropertyBrowsing status codes
  213. #define PERPROP_E_FIRST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
  214. #define PERPROP_E_LAST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x020F)
  215. #define PERPROP_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  216. #define PERPROP_S_LAST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  217. #define PERPROP_E_NOPAGEAVAILABLE (PERPROP_E_FIRST+0)
  218. // no page available for requested property
  219. /////////////////////////////////////////////////////////////////////////////
  220. // OLEMISC_ constants
  221. #define OLEMISC_INVISIBLEATRUNTIME 0x00000400
  222. #define OLEMISC_ALWAYSRUN 0x00000800
  223. #define OLEMISC_ACTSLIKEBUTTON 0x00001000
  224. #define OLEMISC_ACTSLIKELABEL 0x00002000
  225. #define OLEMISC_NOUIACTIVATE 0x00004000
  226. #define OLEMISC_ALIGNABLE 0x00008000
  227. #define OLEMISC_SIMPLEFRAME 0x00010000
  228. #define OLEMISC_SETCLIENTSITEFIRST 0x00020000
  229. #define OLEMISC_IMEMODE 0x00040000
  230. /////////////////////////////////////////////////////////////////////////////
  231. // OLEIVERB_ constants
  232. #ifndef OLEIVERB_PROPERTIES
  233. #define OLEIVERB_PROPERTIES (-7L)
  234. #endif
  235. /////////////////////////////////////////////////////////////////////////////
  236. // Variant type (VT_) tags for property sets
  237. #define VT_STREAMED_PROPSET 73 // [P] Stream contains a property set
  238. #define VT_STORED_PROPSET 74 // [P] Storage contains a property set
  239. #define VT_BLOB_PROPSET 75 // [P] Blob contains a property set
  240. /////////////////////////////////////////////////////////////////////////////
  241. // Variant type (VT_) tags that are just aliases for others
  242. #define VT_COLOR VT_I4
  243. #define VT_XPOS_PIXELS VT_I4
  244. #define VT_YPOS_PIXELS VT_I4
  245. #define VT_XSIZE_PIXELS VT_I4
  246. #define VT_YSIZE_PIXELS VT_I4
  247. #define VT_XPOS_HIMETRIC VT_I4
  248. #define VT_YPOS_HIMETRIC VT_I4
  249. #define VT_XSIZE_HIMETRIC VT_I4
  250. #define VT_YSIZE_HIMETRIC VT_I4
  251. #define VT_TRISTATE VT_I2
  252. #define VT_OPTEXCLUSIVE VT_BOOL
  253. #define VT_FONT VT_DISPATCH
  254. #define VT_PICTURE VT_DISPATCH
  255. #ifdef _WIN32
  256. #define VT_HANDLE VT_I4
  257. #else
  258. #define VT_HANDLE VT_I2
  259. #endif
  260. /////////////////////////////////////////////////////////////////////////////
  261. // Reflected Window Message IDs
  262. #define OCM__BASE (WM_USER+0x1c00)
  263. #define OCM_COMMAND (OCM__BASE + WM_COMMAND)
  264. #ifdef _WIN32
  265. #define OCM_CTLCOLORBTN (OCM__BASE + WM_CTLCOLORBTN)
  266. #define OCM_CTLCOLOREDIT (OCM__BASE + WM_CTLCOLOREDIT)
  267. #define OCM_CTLCOLORDLG (OCM__BASE + WM_CTLCOLORDLG)
  268. #define OCM_CTLCOLORLISTBOX (OCM__BASE + WM_CTLCOLORLISTBOX)
  269. #define OCM_CTLCOLORMSGBOX (OCM__BASE + WM_CTLCOLORMSGBOX)
  270. #define OCM_CTLCOLORSCROLLBAR (OCM__BASE + WM_CTLCOLORSCROLLBAR)
  271. #define OCM_CTLCOLORSTATIC (OCM__BASE + WM_CTLCOLORSTATIC)
  272. #else
  273. #define OCM_CTLCOLOR (OCM__BASE + WM_CTLCOLOR)
  274. #endif
  275. #define OCM_DRAWITEM (OCM__BASE + WM_DRAWITEM)
  276. #define OCM_MEASUREITEM (OCM__BASE + WM_MEASUREITEM)
  277. #define OCM_DELETEITEM (OCM__BASE + WM_DELETEITEM)
  278. #define OCM_VKEYTOITEM (OCM__BASE + WM_VKEYTOITEM)
  279. #define OCM_CHARTOITEM (OCM__BASE + WM_CHARTOITEM)
  280. #define OCM_COMPAREITEM (OCM__BASE + WM_COMPAREITEM)
  281. #define OCM_HSCROLL (OCM__BASE + WM_HSCROLL)
  282. #define OCM_VSCROLL (OCM__BASE + WM_VSCROLL)
  283. #define OCM_PARENTNOTIFY (OCM__BASE + WM_PARENTNOTIFY)
  284. /////////////////////////////////////////////////////////////////////////////
  285. // Self-registration APIs (to be implemented by server DLL)
  286. STDAPI DllRegisterServer(void);
  287. STDAPI DllUnregisterServer(void);
  288. /////////////////////////////////////////////////////////////////////////////
  289. // Property frame APIs
  290. STDAPI OleCreatePropertyFrame(HWND hwndOwner, UINT x, UINT y,
  291. LPCOLESTR lpszCaption, ULONG cObjects, LPUNKNOWN FAR* ppUnk, ULONG cPages,
  292. LPCLSID pPageClsID, LCID lcid, DWORD dwReserved, LPVOID pvReserved);
  293. STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams);
  294. /////////////////////////////////////////////////////////////////////////////
  295. // Standard type APIs
  296. STDAPI OleTranslateColor(OLE_COLOR clr, HPALETTE hpal, COLORREF* lpcolorref);
  297. STDAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid,
  298. LPVOID FAR* lplpvObj);
  299. STDAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid, BOOL fOwn,
  300. LPVOID FAR* lplpvObj);
  301. STDAPI OleLoadPicture(LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
  302. REFIID riid, LPVOID FAR* lplpvObj);
  303. STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE hinstExe, HICON hIcon);
  304. /////////////////////////////////////////////////////////////////////////////
  305. // POINTF structure
  306. typedef struct tagPOINTF
  307. {
  308. float x;
  309. float y;
  310. } POINTF;
  311. /////////////////////////////////////////////////////////////////////////////
  312. // CONTROLINFO structure
  313. typedef struct tagCONTROLINFO
  314. {
  315. ULONG cb; // Structure size
  316. HACCEL hAccel; // Control mnemonics
  317. USHORT cAccel; // Number of entries in mnemonics table
  318. DWORD dwFlags; // Flags chosen from below
  319. } CONTROLINFO;
  320. #define CTRLINFO_EATS_RETURN 1 // Control doesn't send Return to container
  321. #define CTRLINFO_EATS_ESCAPE 2 // Control doesn't send Escape to container
  322. /////////////////////////////////////////////////////////////////////////////
  323. // IOleControl interface
  324. #undef INTERFACE
  325. #define INTERFACE IOleControl
  326. DECLARE_INTERFACE_(IOleControl, IUnknown)
  327. {
  328. // IUnknown methods
  329. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  330. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  331. STDMETHOD_(ULONG,Release)(THIS) PURE;
  332. // IOleControl methods
  333. STDMETHOD(GetControlInfo)(THIS_ LPCONTROLINFO pCI) PURE;
  334. STDMETHOD(OnMnemonic)(THIS_ LPMSG pMsg) PURE;
  335. STDMETHOD(OnAmbientPropertyChange)(THIS_ DISPID dispid) PURE;
  336. STDMETHOD(FreezeEvents)(THIS_ BOOL bFreeze) PURE;
  337. };
  338. /////////////////////////////////////////////////////////////////////////////
  339. // IOleControlSite interface
  340. #undef INTERFACE
  341. #define INTERFACE IOleControlSite
  342. DECLARE_INTERFACE_(IOleControlSite, IUnknown)
  343. {
  344. // IUnknown methods
  345. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  346. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  347. STDMETHOD_(ULONG,Release)(THIS) PURE;
  348. // IOleControlSite methods
  349. STDMETHOD(OnControlInfoChanged)(THIS) PURE;
  350. STDMETHOD(LockInPlaceActive)(THIS_ BOOL fLock) PURE;
  351. STDMETHOD(GetExtendedControl)(THIS_ LPDISPATCH FAR* ppDisp) PURE;
  352. STDMETHOD(TransformCoords)(THIS_ POINTL FAR* lpptlHimetric,
  353. POINTF FAR* lpptfContainer, DWORD flags) PURE;
  354. STDMETHOD(TranslateAccelerator)(THIS_ LPMSG lpMsg, DWORD grfModifiers)
  355. PURE;
  356. STDMETHOD(OnFocus)(THIS_ BOOL fGotFocus) PURE;
  357. STDMETHOD(ShowPropertyFrame)(THIS) PURE;
  358. };
  359. #define XFORMCOORDS_POSITION 0x1
  360. #define XFORMCOORDS_SIZE 0x2
  361. #define XFORMCOORDS_HIMETRICTOCONTAINER 0x4
  362. #define XFORMCOORDS_CONTAINERTOHIMETRIC 0x8
  363. /////////////////////////////////////////////////////////////////////////////
  364. // ISimpleFrameSite interface
  365. #undef INTERFACE
  366. #define INTERFACE ISimpleFrameSite
  367. DECLARE_INTERFACE_(ISimpleFrameSite, IUnknown)
  368. {
  369. // IUnknown methods
  370. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  371. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  372. STDMETHOD_(ULONG,Release)(THIS) PURE;
  373. // ISimpleFrameSite methods
  374. STDMETHOD(PreMessageFilter)(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
  375. LRESULT FAR* lplResult, DWORD FAR * lpdwCookie) PURE;
  376. STDMETHOD(PostMessageFilter)(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
  377. LRESULT FAR* lplResult, DWORD dwCookie) PURE;
  378. };
  379. /////////////////////////////////////////////////////////////////////////////
  380. // IPersistStreamInit interface
  381. #undef INTERFACE
  382. #define INTERFACE IPersistStreamInit
  383. DECLARE_INTERFACE_(IPersistStreamInit, IPersist)
  384. {
  385. // IUnknown methods
  386. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  387. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  388. STDMETHOD_(ULONG,Release)(THIS) PURE;
  389. // IPersist methods
  390. STDMETHOD(GetClassID)(THIS_ LPCLSID lpClassID) PURE;
  391. // IPersistStreamInit methods
  392. STDMETHOD(IsDirty)(THIS) PURE;
  393. STDMETHOD(Load)(THIS_ LPSTREAM pStm) PURE;
  394. STDMETHOD(Save)(THIS_ LPSTREAM pStm, BOOL fClearDirty) PURE;
  395. STDMETHOD(GetSizeMax)(THIS_ ULARGE_INTEGER FAR* pcbSize) PURE;
  396. STDMETHOD(InitNew)(THIS) PURE;
  397. };
  398. /////////////////////////////////////////////////////////////////////////////
  399. // IPropertyNotifySink interface
  400. #undef INTERFACE
  401. #define INTERFACE IPropertyNotifySink
  402. DECLARE_INTERFACE_(IPropertyNotifySink, IUnknown)
  403. {
  404. // IUnknown methods
  405. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  406. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  407. STDMETHOD_(ULONG,Release)(THIS) PURE;
  408. // IPropertyNotifySink methods
  409. STDMETHOD(OnChanged)(THIS_ DISPID dispid) PURE;
  410. STDMETHOD(OnRequestEdit)(THIS_ DISPID dispid) PURE;
  411. };
  412. /////////////////////////////////////////////////////////////////////////////
  413. // IProvideClassInfo interface
  414. #undef INTERFACE
  415. #define INTERFACE IProvideClassInfo
  416. DECLARE_INTERFACE_(IProvideClassInfo, IUnknown)
  417. {
  418. // IUnknown methods
  419. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  420. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  421. STDMETHOD_(ULONG,Release)(THIS) PURE;
  422. // IProvideClassInfo methods
  423. STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO FAR* ppTI) PURE;
  424. };
  425. /////////////////////////////////////////////////////////////////////////////
  426. // IConnectionPointContainer interface
  427. #undef INTERFACE
  428. #define INTERFACE IConnectionPointContainer
  429. DECLARE_INTERFACE_(IConnectionPointContainer, IUnknown)
  430. {
  431. // IUnknown methods
  432. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  433. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  434. STDMETHOD_(ULONG,Release)(THIS) PURE;
  435. // IConnectionPointContainer methods
  436. STDMETHOD(EnumConnectionPoints)(THIS_ LPENUMCONNECTIONPOINTS FAR* ppEnum)
  437. PURE;
  438. STDMETHOD(FindConnectionPoint)(THIS_ REFIID iid,
  439. LPCONNECTIONPOINT FAR* ppCP) PURE;
  440. };
  441. /////////////////////////////////////////////////////////////////////////////
  442. // IEnumConnectionPoint interface
  443. #undef INTERFACE
  444. #define INTERFACE IEnumConnectionPoints
  445. DECLARE_INTERFACE_(IEnumConnectionPoints, IUnknown)
  446. {
  447. // IUnknown methods
  448. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  449. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  450. STDMETHOD_(ULONG,Release)(THIS) PURE;
  451. // IEnumConnectionPoints methods
  452. STDMETHOD(Next)(THIS_ ULONG cConnections, LPCONNECTIONPOINT FAR* rgpcn,
  453. ULONG FAR* lpcFetched) PURE;
  454. STDMETHOD(Skip)(THIS_ ULONG cConnections) PURE;
  455. STDMETHOD(Reset)(THIS) PURE;
  456. STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONPOINTS FAR* ppEnum) PURE;
  457. };
  458. /////////////////////////////////////////////////////////////////////////////
  459. // IConnectionPoint interface
  460. #undef INTERFACE
  461. #define INTERFACE IConnectionPoint
  462. DECLARE_INTERFACE_(IConnectionPoint, IUnknown)
  463. {
  464. // IUnknown methods
  465. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  466. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  467. STDMETHOD_(ULONG,Release)(THIS) PURE;
  468. // IConnectionPoint methods
  469. STDMETHOD(GetConnectionInterface)(THIS_ IID FAR* pIID) PURE;
  470. STDMETHOD(GetConnectionPointContainer)(THIS_
  471. IConnectionPointContainer FAR* FAR* ppCPC) PURE;
  472. STDMETHOD(Advise)(THIS_ LPUNKNOWN pUnkSink, DWORD FAR* pdwCookie) PURE;
  473. STDMETHOD(Unadvise)(THIS_ DWORD dwCookie) PURE;
  474. STDMETHOD(EnumConnections)(THIS_ LPENUMCONNECTIONS FAR* ppEnum) PURE;
  475. };
  476. /////////////////////////////////////////////////////////////////////////////
  477. // CONNECTDATA structure
  478. typedef struct tagCONNECTDATA
  479. {
  480. LPUNKNOWN pUnk;
  481. DWORD dwCookie;
  482. } CONNECTDATA;
  483. /////////////////////////////////////////////////////////////////////////////
  484. // IEnumConnections interface
  485. #undef INTERFACE
  486. #define INTERFACE IEnumConnections
  487. DECLARE_INTERFACE_(IEnumConnections, IUnknown)
  488. {
  489. // IUnknown methods
  490. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  491. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  492. STDMETHOD_(ULONG,Release)(THIS) PURE;
  493. // IEnumConnections methods
  494. STDMETHOD(Next)(THIS_ ULONG cConnections, LPCONNECTDATA rgcd,
  495. ULONG FAR* lpcFetched) PURE;
  496. STDMETHOD(Skip)(THIS_ ULONG cConnections) PURE;
  497. STDMETHOD(Reset)(THIS) PURE;
  498. STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONS FAR* ppecn) PURE;
  499. };
  500. /////////////////////////////////////////////////////////////////////////////
  501. // LICINFO structure
  502. typedef struct tagLICINFO
  503. {
  504. long cbLicInfo;
  505. BOOL fRuntimeKeyAvail;
  506. BOOL fLicVerified;
  507. } LICINFO;
  508. /////////////////////////////////////////////////////////////////////////////
  509. // IClassFactory2 interface
  510. #undef INTERFACE
  511. #define INTERFACE IClassFactory2
  512. DECLARE_INTERFACE_(IClassFactory2, IClassFactory)
  513. {
  514. // IUnknown methods
  515. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  516. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  517. STDMETHOD_(ULONG,Release)(THIS) PURE;
  518. // IClassFactory methods
  519. STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid,
  520. LPVOID FAR* ppvObject) PURE;
  521. STDMETHOD(LockServer)(THIS_ BOOL fLock) PURE;
  522. // IClassFactory2 methods
  523. STDMETHOD(GetLicInfo)(THIS_ LPLICINFO pLicInfo) PURE;
  524. STDMETHOD(RequestLicKey)(THIS_ DWORD dwResrved, BSTR FAR* pbstrKey) PURE;
  525. STDMETHOD(CreateInstanceLic)(THIS_ LPUNKNOWN pUnkOuter,
  526. LPUNKNOWN pUnkReserved, REFIID riid, BSTR bstrKey,
  527. LPVOID FAR* ppvObject) PURE;
  528. };
  529. /////////////////////////////////////////////////////////////////////////////
  530. // CAUUID structure - a counted array of UUIDs
  531. #ifndef _tagCAUUID_DEFINED
  532. #define _tagCAUUID_DEFINED
  533. #define _CAUUID_DEFINED
  534. typedef struct tagCAUUID
  535. {
  536. ULONG cElems;
  537. GUID FAR* pElems;
  538. } CAUUID;
  539. #endif
  540. /////////////////////////////////////////////////////////////////////////////
  541. // CALPOLESTR structure - a counted array of LPOLESTRs
  542. #ifndef _tagCALPOLESTR_DEFINED
  543. #define _tagCALPOLESTR_DEFINED
  544. #define _CALPOLESTR_DEFINED
  545. typedef struct tagCALPOLESTR
  546. {
  547. ULONG cElems;
  548. LPOLESTR FAR* pElems;
  549. } CALPOLESTR;
  550. #endif
  551. /////////////////////////////////////////////////////////////////////////////
  552. // CAUUID structure - a counted array of DWORDs
  553. #ifndef _tagCADWORD_DEFINED
  554. #define _tagCADWORD_DEFINED
  555. #define _CADWORD_DEFINED
  556. typedef struct tagCADWORD
  557. {
  558. ULONG cElems;
  559. DWORD FAR* pElems;
  560. } CADWORD;
  561. #endif
  562. /////////////////////////////////////////////////////////////////////////////
  563. // OCPFIPARAMS structure - parameters for OleCreatePropertyFrameIndirect
  564. typedef struct tagOCPFIPARAMS
  565. {
  566. ULONG cbStructSize;
  567. HWND hWndOwner;
  568. int x;
  569. int y;
  570. LPCOLESTR lpszCaption;
  571. ULONG cObjects;
  572. LPUNKNOWN FAR* lplpUnk;
  573. ULONG cPages;
  574. CLSID FAR* lpPages;
  575. LCID lcid;
  576. DISPID dispidInitialProperty;
  577. } OCPFIPARAMS;
  578. /////////////////////////////////////////////////////////////////////////////
  579. // PROPPAGEINFO structure - information about a property page
  580. typedef struct tagPROPPAGEINFO
  581. {
  582. size_t cb;
  583. LPOLESTR pszTitle;
  584. SIZE size;
  585. LPOLESTR pszDocString;
  586. LPOLESTR pszHelpFile;
  587. DWORD dwHelpContext;
  588. } PROPPAGEINFO;
  589. /////////////////////////////////////////////////////////////////////////////
  590. // ISpecifyPropertyPages interface
  591. #undef INTERFACE
  592. #define INTERFACE ISpecifyPropertyPages
  593. DECLARE_INTERFACE_(ISpecifyPropertyPages, IUnknown)
  594. {
  595. // IUnknown methods
  596. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  597. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  598. STDMETHOD_(ULONG,Release)(THIS) PURE;
  599. // ISpecifyPropertyPages interface
  600. STDMETHOD(GetPages)(THIS_ CAUUID FAR* pPages) PURE;
  601. };
  602. /////////////////////////////////////////////////////////////////////////////
  603. // IPerPropertyBrowsing interface
  604. #undef INTERFACE
  605. #define INTERFACE IPerPropertyBrowsing
  606. DECLARE_INTERFACE_(IPerPropertyBrowsing, IUnknown)
  607. {
  608. // IUnknown methods
  609. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  610. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  611. STDMETHOD_(ULONG,Release)(THIS) PURE;
  612. // IPerPropertyBrowsing interface
  613. STDMETHOD(GetDisplayString)(THIS_ DISPID dispid, BSTR FAR* lpbstr) PURE;
  614. STDMETHOD(MapPropertyToPage)(THIS_ DISPID dispid, LPCLSID lpclsid) PURE;
  615. STDMETHOD(GetPredefinedStrings)(THIS_ DISPID dispid,
  616. CALPOLESTR FAR* lpcaStringsOut, CADWORD FAR* lpcaCookiesOut) PURE;
  617. STDMETHOD(GetPredefinedValue)(THIS_ DISPID dispid, DWORD dwCookie,
  618. VARIANT FAR* lpvarOut) PURE;
  619. };
  620. /////////////////////////////////////////////////////////////////////////////
  621. // IPropertyPageSite interface
  622. #undef INTERFACE
  623. #define INTERFACE IPropertyPageSite
  624. DECLARE_INTERFACE_(IPropertyPageSite, IUnknown)
  625. {
  626. // IUnknown methods
  627. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  628. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  629. STDMETHOD_(ULONG,Release)(THIS) PURE;
  630. // IPropertyPageSite methods
  631. STDMETHOD(OnStatusChange)(THIS_ DWORD flags) PURE;
  632. STDMETHOD(GetLocaleID)(THIS_ LCID FAR* pLocaleID) PURE;
  633. STDMETHOD(GetPageContainer)(THIS_ LPUNKNOWN FAR* ppUnk) PURE;
  634. STDMETHOD(TranslateAccelerator)(THIS_ LPMSG lpMsg) PURE;
  635. };
  636. #define PROPPAGESTATUS_DIRTY 0x1 // Values in page have changed
  637. #define PROPPAGESTATUS_VALIDATE 0x2 // Appropriate time to validate/apply
  638. /////////////////////////////////////////////////////////////////////////////
  639. // IPropertyPage interface
  640. #undef INTERFACE
  641. #define INTERFACE IPropertyPage
  642. DECLARE_INTERFACE_(IPropertyPage, IUnknown)
  643. {
  644. // IUnknown methods
  645. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  646. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  647. STDMETHOD_(ULONG,Release)(THIS) PURE;
  648. // IPropertyPage methods
  649. STDMETHOD(SetPageSite)(THIS_ LPPROPERTYPAGESITE pPageSite) PURE;
  650. STDMETHOD(Activate)(THIS_ HWND hwndParent, LPCRECT lprc, BOOL bModal) PURE;
  651. STDMETHOD(Deactivate)(THIS) PURE;
  652. STDMETHOD(GetPageInfo)(THIS_ LPPROPPAGEINFO pPageInfo) PURE;
  653. STDMETHOD(SetObjects)(THIS_ ULONG cObjects, LPUNKNOWN FAR* ppunk) PURE;
  654. STDMETHOD(Show)(THIS_ UINT nCmdShow) PURE;
  655. STDMETHOD(Move)(LPCRECT prect) PURE;
  656. STDMETHOD(IsPageDirty)(THIS) PURE;
  657. STDMETHOD(Apply)(THIS) PURE;
  658. STDMETHOD(Help)(THIS_ LPCOLESTR lpszHelpDir) PURE;
  659. STDMETHOD(TranslateAccelerator)(THIS_ LPMSG lpMsg) PURE;
  660. };
  661. /////////////////////////////////////////////////////////////////////////////
  662. // IPropertyPage2 interface
  663. #undef INTERFACE
  664. #define INTERFACE IPropertyPage2
  665. DECLARE_INTERFACE_(IPropertyPage2, IPropertyPage)
  666. {
  667. // IUnknown methods
  668. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  669. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  670. STDMETHOD_(ULONG,Release)(THIS) PURE;
  671. // IPropertyPage methods
  672. STDMETHOD(SetPageSite)(THIS_ LPPROPERTYPAGESITE pPageSite) PURE;
  673. STDMETHOD(Activate)(THIS_ HWND hwndParent, LPCRECT lprc, BOOL bModal) PURE;
  674. STDMETHOD(Deactivate)(THIS) PURE;
  675. STDMETHOD(GetPageInfo)(THIS_ LPPROPPAGEINFO pPageInfo) PURE;
  676. STDMETHOD(SetObjects)(THIS_ ULONG cObjects, LPUNKNOWN FAR* ppunk) PURE;
  677. STDMETHOD(Show)(THIS_ UINT nCmdShow) PURE;
  678. STDMETHOD(Move)(LPCRECT prect) PURE;
  679. STDMETHOD(IsPageDirty)(THIS) PURE;
  680. STDMETHOD(Apply)(THIS) PURE;
  681. STDMETHOD(Help)(THIS_ LPCOLESTR lpszHelpDir) PURE;
  682. STDMETHOD(TranslateAccelerator)(THIS_ LPMSG lpMsg) PURE;
  683. // IPropertyPage2 methods
  684. STDMETHOD(EditProperty)(THIS_ DISPID dispid) PURE;
  685. };
  686. /////////////////////////////////////////////////////////////////////////////
  687. // IFont interface
  688. #undef INTERFACE
  689. #define INTERFACE IFont
  690. DECLARE_INTERFACE_(IFont, IUnknown)
  691. {
  692. // IUnknown methods
  693. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  694. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  695. STDMETHOD_(ULONG, Release)(THIS) PURE;
  696. // IFont methods
  697. STDMETHOD(get_Name)(THIS_ BSTR FAR* pname) PURE;
  698. STDMETHOD(put_Name)(THIS_ BSTR name) PURE;
  699. STDMETHOD(get_Size)(THIS_ CY FAR* psize) PURE;
  700. STDMETHOD(put_Size)(THIS_ CY size) PURE;
  701. STDMETHOD(get_Bold)(THIS_ BOOL FAR* pbold) PURE;
  702. STDMETHOD(put_Bold)(THIS_ BOOL bold) PURE;
  703. STDMETHOD(get_Italic)(THIS_ BOOL FAR* pitalic) PURE;
  704. STDMETHOD(put_Italic)(THIS_ BOOL italic) PURE;
  705. STDMETHOD(get_Underline)(THIS_ BOOL FAR* punderline) PURE;
  706. STDMETHOD(put_Underline)(THIS_ BOOL underline) PURE;
  707. STDMETHOD(get_Strikethrough)(THIS_ BOOL FAR* pstrikethrough) PURE;
  708. STDMETHOD(put_Strikethrough)(THIS_ BOOL strikethrough) PURE;
  709. STDMETHOD(get_Weight)(THIS_ short FAR* pweight) PURE;
  710. STDMETHOD(put_Weight)(THIS_ short weight) PURE;
  711. STDMETHOD(get_Charset)(THIS_ short FAR* pcharset) PURE;
  712. STDMETHOD(put_Charset)(THIS_ short charset) PURE;
  713. STDMETHOD(get_hFont)(THIS_ HFONT FAR* phfont) PURE;
  714. STDMETHOD(Clone)(THIS_ IFont FAR* FAR* lplpfont) PURE;
  715. STDMETHOD(IsEqual)(THIS_ IFont FAR * lpFontOther) PURE;
  716. STDMETHOD(SetRatio)(THIS_ long cyLogical, long cyHimetric) PURE;
  717. STDMETHOD(QueryTextMetrics)(THIS_ LPTEXTMETRICOLE lptm) PURE;
  718. STDMETHOD(AddRefHfont)(THIS_ HFONT hfont) PURE;
  719. STDMETHOD(ReleaseHfont)(THIS_ HFONT hfont) PURE;
  720. };
  721. /////////////////////////////////////////////////////////////////////////////
  722. // IFontDisp interface
  723. #undef INTERFACE
  724. #define INTERFACE IFontDisp
  725. DECLARE_INTERFACE_(IFontDisp, IDispatch)
  726. {
  727. // IUnknown methods
  728. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  729. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  730. STDMETHOD_(ULONG, Release)(THIS) PURE;
  731. // IDispatch methods
  732. STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
  733. STDMETHOD(GetTypeInfo)(THIS_ UINT itinfo, LCID lcid,
  734. ITypeInfo FAR* FAR* pptinfo) PURE;
  735. STDMETHOD(GetIDsOfNames)(THIS_ REFIID riid, LPOLESTR FAR* rgszNames,
  736. UINT cNames, LCID lcid, DISPID FAR* rgdispid) PURE;
  737. STDMETHOD(Invoke)(THIS_ DISPID dispidMember, REFIID riid, LCID lcid,
  738. WORD wFlags, DISPPARAMS FAR* pdispparams, VARIANT FAR* pvarResult,
  739. EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr) PURE;
  740. };
  741. /////////////////////////////////////////////////////////////////////////////
  742. // FONTDESC structure
  743. #define FONTSIZE(n) { n##0000, 0 }
  744. typedef struct tagFONTDESC
  745. {
  746. UINT cbSizeofstruct;
  747. LPOLESTR lpstrName;
  748. CY cySize;
  749. SHORT sWeight;
  750. SHORT sCharset;
  751. BOOL fItalic;
  752. BOOL fUnderline;
  753. BOOL fStrikethrough;
  754. } FONTDESC;
  755. /////////////////////////////////////////////////////////////////////////////
  756. // Picture attributes
  757. #define PICTURE_SCALABLE 0x1l
  758. #define PICTURE_TRANSPARENT 0x2l
  759. /////////////////////////////////////////////////////////////////////////////
  760. // IPicture interface
  761. #undef INTERFACE
  762. #define INTERFACE IPicture
  763. DECLARE_INTERFACE_(IPicture, IUnknown)
  764. {
  765. // IUnknown methods
  766. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  767. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  768. STDMETHOD_(ULONG, Release)(THIS) PURE;
  769. // IPicture methods
  770. STDMETHOD(get_Handle)(THIS_ OLE_HANDLE FAR* phandle) PURE;
  771. STDMETHOD(get_hPal)(THIS_ OLE_HANDLE FAR* phpal) PURE;
  772. STDMETHOD(get_Type)(THIS_ short FAR* ptype) PURE;
  773. STDMETHOD(get_Width)(THIS_ OLE_XSIZE_HIMETRIC FAR* pwidth) PURE;
  774. STDMETHOD(get_Height)(THIS_ OLE_YSIZE_HIMETRIC FAR* pheight) PURE;
  775. STDMETHOD(Render)(THIS_ HDC hdc, long x, long y, long cx, long cy,
  776. OLE_XPOS_HIMETRIC xSrc, OLE_YPOS_HIMETRIC ySrc,
  777. OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc,
  778. LPCRECT lprcWBounds) PURE;
  779. STDMETHOD(set_hPal)(THIS_ OLE_HANDLE hpal) PURE;
  780. STDMETHOD(get_CurDC)(THIS_ HDC FAR * phdcOut) PURE;
  781. STDMETHOD(SelectPicture)(THIS_
  782. HDC hdcIn, HDC FAR * phdcOut, OLE_HANDLE FAR * phbmpOut) PURE;
  783. STDMETHOD(get_KeepOriginalFormat)(THIS_ BOOL * pfkeep) PURE;
  784. STDMETHOD(put_KeepOriginalFormat)(THIS_ BOOL fkeep) PURE;
  785. STDMETHOD(PictureChanged)(THIS) PURE;
  786. STDMETHOD(SaveAsFile)(THIS_ LPSTREAM lpstream, BOOL fSaveMemCopy,
  787. LONG FAR * lpcbSize) PURE;
  788. STDMETHOD(get_Attributes)(THIS_ DWORD FAR * lpdwAttr) PURE;
  789. };
  790. /////////////////////////////////////////////////////////////////////////////
  791. // IPictureDisp interface
  792. #undef INTERFACE
  793. #define INTERFACE IPictureDisp
  794. DECLARE_INTERFACE_(IPictureDisp, IDispatch)
  795. {
  796. // IUnknown methods
  797. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  798. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  799. STDMETHOD_(ULONG, Release)(THIS) PURE;
  800. // IDispatch methods
  801. STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
  802. STDMETHOD(GetTypeInfo)(THIS_ UINT itinfo, LCID lcid,
  803. ITypeInfo FAR* FAR* pptinfo) PURE;
  804. STDMETHOD(GetIDsOfNames)(THIS_ REFIID riid, LPOLESTR FAR* rgszNames,
  805. UINT cNames, LCID lcid, DISPID FAR* rgdispid) PURE;
  806. STDMETHOD(Invoke)(THIS_ DISPID dispidMember, REFIID riid, LCID lcid,
  807. WORD wFlags, DISPPARAMS FAR* pdispparams, VARIANT FAR* pvarResult,
  808. EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr) PURE;
  809. };
  810. /////////////////////////////////////////////////////////////////////////////
  811. // PICTDESC structure
  812. #define PICTYPE_UNINITIALIZED ((UINT)-1)
  813. #define PICTYPE_NONE 0
  814. #define PICTYPE_BITMAP 1
  815. #define PICTYPE_METAFILE 2
  816. #define PICTYPE_ICON 3
  817. typedef struct tagPICTDESC
  818. {
  819. UINT cbSizeofstruct;
  820. UINT picType;
  821. union
  822. {
  823. struct
  824. {
  825. HBITMAP hbitmap; // Bitmap
  826. HPALETTE hpal; // Accompanying palette
  827. } bmp;
  828. struct
  829. {
  830. HMETAFILE hmeta; // Metafile
  831. int xExt;
  832. int yExt; // Extent
  833. } wmf;
  834. struct
  835. {
  836. HICON hicon; // Icon
  837. } icon;
  838. };
  839. } PICTDESC;
  840. #ifdef _WIN32
  841. #ifndef RC_INVOKED
  842. #pragma pack()
  843. #endif // not RC_INVOKED
  844. #endif // _WIN32
  845. #endif // not __MKTYPLIB__
  846. /////////////////////////////////////////////////////////////////////////////
  847. // Standard dispatch ID constants
  848. #define DISPID_AUTOSIZE (-500)
  849. #define DISPID_BACKCOLOR (-501)
  850. #define DISPID_BACKSTYLE (-502)
  851. #define DISPID_BORDERCOLOR (-503)
  852. #define DISPID_BORDERSTYLE (-504)
  853. #define DISPID_BORDERWIDTH (-505)
  854. #define DISPID_DRAWMODE (-507)
  855. #define DISPID_DRAWSTYLE (-508)
  856. #define DISPID_DRAWWIDTH (-509)
  857. #define DISPID_FILLCOLOR (-510)
  858. #define DISPID_FILLSTYLE (-511)
  859. #define DISPID_FONT (-512)
  860. #define DISPID_FORECOLOR (-513)
  861. #define DISPID_ENABLED (-514)
  862. #define DISPID_HWND (-515)
  863. #define DISPID_TABSTOP (-516)
  864. #define DISPID_TEXT (-517)
  865. #define DISPID_CAPTION (-518)
  866. #define DISPID_BORDERVISIBLE (-519)
  867. #define DISPID_REFRESH (-550)
  868. #define DISPID_DOCLICK (-551)
  869. #define DISPID_ABOUTBOX (-552)
  870. #define DISPID_CLICK (-600)
  871. #define DISPID_DBLCLICK (-601)
  872. #define DISPID_KEYDOWN (-602)
  873. #define DISPID_KEYPRESS (-603)
  874. #define DISPID_KEYUP (-604)
  875. #define DISPID_MOUSEDOWN (-605)
  876. #define DISPID_MOUSEMOVE (-606)
  877. #define DISPID_MOUSEUP (-607)
  878. #define DISPID_ERROREVENT (-608)
  879. #define DISPID_AMBIENT_BACKCOLOR (-701)
  880. #define DISPID_AMBIENT_DISPLAYNAME (-702)
  881. #define DISPID_AMBIENT_FONT (-703)
  882. #define DISPID_AMBIENT_FORECOLOR (-704)
  883. #define DISPID_AMBIENT_LOCALEID (-705)
  884. #define DISPID_AMBIENT_MESSAGEREFLECT (-706)
  885. #define DISPID_AMBIENT_SCALEUNITS (-707)
  886. #define DISPID_AMBIENT_TEXTALIGN (-708)
  887. #define DISPID_AMBIENT_USERMODE (-709)
  888. #define DISPID_AMBIENT_UIDEAD (-710)
  889. #define DISPID_AMBIENT_SHOWGRABHANDLES (-711)
  890. #define DISPID_AMBIENT_SHOWHATCHING (-712)
  891. #define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
  892. #define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
  893. #define DISPID_AMBIENT_AUTOCLIP (-715)
  894. /////////////////////////////////////////////////////////////////////////////
  895. // Dispatch ID constants for font and picture types
  896. #define DISPID_FONT_NAME 0
  897. #define DISPID_FONT_SIZE 2
  898. #define DISPID_FONT_BOLD 3
  899. #define DISPID_FONT_ITALIC 4
  900. #define DISPID_FONT_UNDER 5
  901. #define DISPID_FONT_STRIKE 6
  902. #define DISPID_FONT_WEIGHT 7
  903. #define DISPID_FONT_CHARSET 8
  904. #define DISPID_PICT_HANDLE 0
  905. #define DISPID_PICT_HPAL 2
  906. #define DISPID_PICT_TYPE 3
  907. #define DISPID_PICT_WIDTH 4
  908. #define DISPID_PICT_HEIGHT 5
  909. #define DISPID_PICT_RENDER 6
  910. #ifdef __MKTYPLIB__
  911. /////////////////////////////////////////////////////////////////////////////
  912. // Names of modules containing type libraries for standard types
  913. #ifdef _WIN32
  914. #define STDOLE_TLB "stdole32.tlb"
  915. #else
  916. #define STDOLE_TLB "stdole.tlb"
  917. #endif
  918. #ifdef _WIN32
  919. #ifdef _UNICODE
  920. #ifdef _DEBUG
  921. #define STDTYPE_TLB "oc30ud.dll"
  922. #else
  923. #define STDTYPE_TLB "oc30u.dll"
  924. #endif
  925. #else
  926. #ifdef _DEBUG
  927. #define STDTYPE_TLB "oc30d.dll"
  928. #else
  929. #define STDTYPE_TLB "oc30.dll"
  930. #endif
  931. #endif
  932. #else
  933. #ifdef _DEBUG
  934. #define STDTYPE_TLB "oc25d.dll"
  935. #else
  936. #define STDTYPE_TLB "oc25.dll"
  937. #endif
  938. #endif
  939. #endif // __MKTYPLIB__
  940. #endif // _OLECTL_H_