source: Daodan/MinGW/include/olectl.h@ 1054

Last change on this file since 1054 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 11.7 KB
Line 
1#ifndef _OLECTL_H
2#define _OLECTL_H
3#if __GNUC__ >= 3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#include <ocidl.h>
12#include <olectlid.h>
13
14#define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR,FACILITY_CONTROL,n)
15#define CTL_E_ILLEGALFUNCTIONCALL STD_CTL_SCODE(5)
16#define CTL_E_OVERFLOW STD_CTL_SCODE(6)
17#define CTL_E_OUTOFMEMORY STD_CTL_SCODE(7)
18#define CTL_E_DIVISIONBYZERO STD_CTL_SCODE(11)
19#define CTL_E_OUTOFSTRINGSPACE STD_CTL_SCODE(14)
20#define CTL_E_OUTOFSTACKSPACE STD_CTL_SCODE(28)
21#define CTL_E_BADFILENAMEORNUMBER STD_CTL_SCODE(52)
22#define CTL_E_FILENOTFOUND STD_CTL_SCODE(53)
23#define CTL_E_BADFILEMODE STD_CTL_SCODE(54)
24#define CTL_E_FILEALREADYOPEN STD_CTL_SCODE(55)
25#define CTL_E_DEVICEIOERROR STD_CTL_SCODE(57)
26#define CTL_E_FILEALREADYEXISTS STD_CTL_SCODE(58)
27#define CTL_E_BADRECORDLENGTH STD_CTL_SCODE(59)
28#define CTL_E_DISKFULL STD_CTL_SCODE(61)
29#define CTL_E_BADRECORDNUMBER STD_CTL_SCODE(63)
30#define CTL_E_BADFILENAME STD_CTL_SCODE(64)
31#define CTL_E_TOOMANYFILES STD_CTL_SCODE(67)
32#define CTL_E_DEVICEUNAVAILABLE STD_CTL_SCODE(68)
33#define CTL_E_PERMISSIONDENIED STD_CTL_SCODE(70)
34#define CTL_E_DISKNOTREADY STD_CTL_SCODE(71)
35#define CTL_E_PATHFILEACCESSERROR STD_CTL_SCODE(75)
36#define CTL_E_PATHNOTFOUND STD_CTL_SCODE(76)
37#define CTL_E_INVALIDPATTERNSTRING STD_CTL_SCODE(93)
38#define CTL_E_INVALIDUSEOFNULL STD_CTL_SCODE(94)
39#define CTL_E_INVALIDFILEFORMAT STD_CTL_SCODE(321)
40#define CTL_E_INVALIDPROPERTYVALUE STD_CTL_SCODE(380)
41#define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
42#define CTL_E_SETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(382)
43#define CTL_E_SETNOTSUPPORTED STD_CTL_SCODE(383)
44#define CTL_E_NEEDPROPERTYARRAYINDEX STD_CTL_SCODE(385)
45#define CTL_E_SETNOTPERMITTED STD_CTL_SCODE(387)
46#define CTL_E_GETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(393)
47#define CTL_E_GETNOTSUPPORTED STD_CTL_SCODE(394)
48#define CTL_E_PROPERTYNOTFOUND STD_CTL_SCODE(422)
49#define CTL_E_INVALIDCLIPBOARDFORMAT STD_CTL_SCODE(460)
50#define CTL_E_INVALIDPICTURE STD_CTL_SCODE(481)
51#define CTL_E_PRINTERERROR STD_CTL_SCODE(482)
52#define CTL_E_CANTSAVEFILETOTEMP STD_CTL_SCODE(735)
53#define CTL_E_SEARCHTEXTNOTFOUND STD_CTL_SCODE(744)
54#define CTL_E_REPLACEMENTSTOOLONG STD_CTL_SCODE(746)
55#define CUSTOM_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR,FACILITY_CONTROL,n)
56#define CTL_E_CUSTOM_FIRST CUSTOM_CTL_SCODE(600)
57#define CLASS_E_NOTLICENSED (CLASSFACTORY_E_FIRST+2)
58#define CONNECT_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
59#define CONNECT_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
60#define CONNECT_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
61#define CONNECT_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
62#define CONNECT_E_NOCONNECTION (CONNECT_E_FIRST+0)
63#define CONNECT_E_ADVISELIMIT (CONNECT_E_FIRST+1)
64#define CONNECT_E_CANNOTCONNECT (CONNECT_E_FIRST+2)
65#define CONNECT_E_OVERRIDDEN (CONNECT_E_FIRST+3)
66#define SELFREG_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
67#define SELFREG_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
68#define SELFREG_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
69#define SELFREG_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
70#define SELFREG_E_TYPELIB (SELFREG_E_FIRST+0)
71#define SELFREG_E_CLASS (SELFREG_E_FIRST+1)
72#define PERPROP_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
73#define PERPROP_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
74#define PERPROP_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
75#define PERPROP_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
76#define PERPROP_E_NOPAGEAVAILABLE PERPROP_E_FIRST
77#define OLEMISC_RECOMPOSEONRESIZE 0x1
78#define OLEMISC_ONLYICONIC 0x2
79#define OLEMISC_INSERTNOTREPLACE 0x4
80#define OLEMISC_STATIC 0x8
81#define OLEMISC_CANTLINKINSIDE 0x10
82#define OLEMISC_CANLINKBYOLE1 0x20
83#define OLEMISC_ISLINKOBJECT 0x40
84#define OLEMISC_INSIDEOUT 0x80
85#define OLEMISC_ACTIVATEWHENVISIBLE 0x100
86#define OLEMISC_RENDERINGISDEVICEINDEPENDENT 0x200
87#define OLEMISC_INVISIBLEATRUNTIME 0x400
88#define OLEMISC_ALWAYSRUN 0x800
89#define OLEMISC_ACTSLIKEBUTTON 0x1000
90#define OLEMISC_ACTSLIKELABEL 0x2000
91#define OLEMISC_NOUIACTIVATE 0x4000
92#define OLEMISC_ALIGNABLE 0x8000
93#define OLEMISC_SIMPLEFRAME 0x10000
94#define OLEMISC_SETCLIENTSITEFIRST 0x20000
95#define OLEMISC_IMEMODE 0x40000
96#define OLEMISC_IGNOREACTIVATEWHENVISIBLE 0x80000
97#define OLEMISC_WANTSTOMENUMERGE 0x100000
98#define OLEMISC_SUPPORTSMULTILEVELUNDO 0x200000
99#define OLEIVERB_PROPERTIES (-7)
100#define VT_STREAMED_PROPSET 73
101#define VT_STORED_PROPSET 74
102#define VT_BLOB_PROPSET 75
103#define VT_VERBOSE_ENUM 76
104#define VT_COLOR VT_I4
105#define VT_XPOS_PIXELS VT_I4
106#define VT_YPOS_PIXELS VT_I4
107#define VT_XSIZE_PIXELS VT_I4
108#define VT_YSIZE_PIXELS VT_I4
109#define VT_XPOS_HIMETRIC VT_I4
110#define VT_YPOS_HIMETRIC VT_I4
111#define VT_XSIZE_HIMETRIC VT_I4
112#define VT_YSIZE_HIMETRIC VT_I4
113#define VT_TRISTATE VT_I2
114#define VT_OPTEXCLUSIVE VT_BOOL
115#define VT_FONT VT_DISPATCH
116#define VT_PICTURE VT_DISPATCH
117#define VT_HANDLE VT_I4
118#define OCM__BASE (WM_USER+0x1c00)
119#define OCM_COMMAND (OCM__BASE+WM_COMMAND)
120#define OCM_CTLCOLORBTN (OCM__BASE+WM_CTLCOLORBTN)
121#define OCM_CTLCOLOREDIT (OCM__BASE+WM_CTLCOLOREDIT)
122#define OCM_CTLCOLORDLG (OCM__BASE+WM_CTLCOLORDLG)
123#define OCM_CTLCOLORLISTBOX (OCM__BASE+WM_CTLCOLORLISTBOX)
124#define OCM_CTLCOLORMSGBOX (OCM__BASE+WM_CTLCOLORMSGBOX)
125#define OCM_CTLCOLORSCROLLBAR (OCM__BASE+WM_CTLCOLORSCROLLBAR)
126#define OCM_CTLCOLORSTATIC (OCM__BASE+WM_CTLCOLORSTATIC)
127#define OCM_DRAWITEM (OCM__BASE+WM_DRAWITEM)
128#define OCM_MEASUREITEM (OCM__BASE+WM_MEASUREITEM)
129#define OCM_DELETEITEM (OCM__BASE+WM_DELETEITEM)
130#define OCM_VKEYTOITEM (OCM__BASE+WM_VKEYTOITEM)
131#define OCM_CHARTOITEM (OCM__BASE+WM_CHARTOITEM)
132#define OCM_COMPAREITEM (OCM__BASE+WM_COMPAREITEM)
133#define OCM_HSCROLL (OCM__BASE+WM_HSCROLL)
134#define OCM_VSCROLL (OCM__BASE+WM_VSCROLL)
135#define OCM_PARENTNOTIFY (OCM__BASE+WM_PARENTNOTIFY)
136#define OCM_NOTIFY (OCM__BASE+WM_NOTIFY)
137#define CTRLINFO_EATS_RETURN 1
138#define CTRLINFO_EATS_ESCAPE 2
139#define XFORMCOORDS_POSITION 1
140#define XFORMCOORDS_SIZE 2
141#define XFORMCOORDS_HIMETRICTOCONTAINER 4
142#define XFORMCOORDS_CONTAINERTOHIMETRIC 8
143#define GUIDKIND_DEFAULT_SOURCE_DISP_IID 1
144#define PROPPAGESTATUS_DIRTY 1
145#define PROPPAGESTATUS_VALIDATE 2
146#define FONTSIZE(n) {n##0000,0}
147#define PICTURE_SCALABLE 1
148#define PICTURE_TRANSPARENT 2
149#define PICTYPE_UNINITIALIZED (-1)
150#define PICTYPE_NONE 0
151#define PICTYPE_BITMAP 1
152#define PICTYPE_METAFILE 2
153#define PICTYPE_ICON 3
154#define PICTYPE_ENHMETAFILE 4
155#define DISPID_AUTOSIZE (-500)
156#define DISPID_BACKCOLOR (-501)
157#define DISPID_BACKSTYLE (-502)
158#define DISPID_BORDERCOLOR (-503)
159#define DISPID_BORDERSTYLE (-504)
160#define DISPID_BORDERWIDTH (-505)
161#define DISPID_DRAWMODE (-507)
162#define DISPID_DRAWSTYLE (-508)
163#define DISPID_DRAWWIDTH (-509)
164#define DISPID_FILLCOLOR (-510)
165#define DISPID_FILLSTYLE (-511)
166#define DISPID_FONT (-512)
167#define DISPID_FORECOLOR (-513)
168#define DISPID_ENABLED (-514)
169#define DISPID_HWND (-515)
170#define DISPID_TABSTOP (-516)
171#define DISPID_TEXT (-517)
172#define DISPID_CAPTION (-518)
173#define DISPID_BORDERVISIBLE (-519)
174#define DISPID_APPEARANCE (-520)
175#define DISPID_MOUSEPOINTER (-521)
176#define DISPID_MOUSEICON (-522)
177#define DISPID_PICTURE (-523)
178#define DISPID_VALID (-524)
179#define DISPID_REFRESH (-550)
180#define DISPID_DOCLICK (-551)
181#define DISPID_ABOUTBOX (-552)
182#define DISPID_CLICK (-600)
183#define DISPID_DBLCLICK (-601)
184#define DISPID_KEYDOWN (-602)
185#define DISPID_KEYPRESS (-603)
186#define DISPID_KEYUP (-604)
187#define DISPID_MOUSEDOWN (-605)
188#define DISPID_MOUSEMOVE (-606)
189#define DISPID_MOUSEUP (-607)
190#define DISPID_ERROREVENT (-608)
191#define DISPID_AMBIENT_BACKCOLOR (-701)
192#define DISPID_AMBIENT_DISPLAYNAME (-702)
193#define DISPID_AMBIENT_FONT (-703)
194#define DISPID_AMBIENT_FORECOLOR (-704)
195#define DISPID_AMBIENT_LOCALEID (-705)
196#define DISPID_AMBIENT_MESSAGEREFLECT (-706)
197#define DISPID_AMBIENT_SCALEUNITS (-707)
198#define DISPID_AMBIENT_TEXTALIGN (-708)
199#define DISPID_AMBIENT_USERMODE (-709)
200#define DISPID_AMBIENT_UIDEAD (-710)
201#define DISPID_AMBIENT_SHOWGRABHANDLES (-711)
202#define DISPID_AMBIENT_SHOWHATCHING (-712)
203#define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
204#define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
205#define DISPID_AMBIENT_AUTOCLIP (-715)
206#define DISPID_AMBIENT_APPEARANCE (-716)
207#define DISPID_AMBIENT_CODEPAGE (-725)
208#define DISPID_AMBIENT_PALETTE (-726)
209#define DISPID_AMBIENT_CHARSET (-727)
210#define DISPID_AMBIENT_RIGHTTOLEFT (-732)
211#define DISPID_AMBIENT_TOPTOBOTTOM (-733)
212
213#define DISPID_FONT_NAME 0
214#define DISPID_FONT_SIZE 2
215#define DISPID_FONT_BOLD 3
216#define DISPID_FONT_ITALIC 4
217#define DISPID_FONT_UNDER 5
218#define DISPID_FONT_STRIKE 6
219#define DISPID_FONT_WEIGHT 7
220#define DISPID_FONT_CHARSET 8
221#define DISPID_PICT_HANDLE 0
222#define DISPID_PICT_HPAL 2
223#define DISPID_PICT_TYPE 3
224#define DISPID_PICT_WIDTH 4
225#define DISPID_PICT_HEIGHT 5
226#define DISPID_PICT_RENDER 6
227
228typedef _COM_interface IOleControl *LPOLECONTROL;
229typedef _COM_interface IOleControlSite *LPOLECONTROLSITE;
230typedef _COM_interface ISimpleFrameSite *LPSIMPLEFRAMESITE;
231typedef _COM_interface IPersistPropertyBag *LPPERSISTPROPERTYBAG;
232typedef _COM_interface IPersistStreamInit *LPPERSISTSTREAMINIT;
233typedef _COM_interface IPersistMemory *LPPERSISTMEMORY;
234typedef _COM_interface IPropertyNotifySink* LPPROPERTYNOTIFYSINK;
235typedef _COM_interface IProvideClassInfo *LPPROVIDECLASSINFO;
236typedef _COM_interface IProvideClassInfo2 *LPPROVIDECLASSINFO2;
237typedef _COM_interface IConnectionPointContainer *LPCONNECTIONPOINTCONTAINER;
238typedef _COM_interface IClassFactory2 *LPCLASSFACTORY2;
239typedef _COM_interface ISpecifyPropertyPages *LPSPECIFYPROPERTYPAGES;
240typedef _COM_interface IPerPropertyBrowsing *LPPERPROPERTYBROWSING;
241typedef _COM_interface IPropertyPage *LPPROPERTYPAGE;
242typedef _COM_interface IPropertyPage2 *LPPROPERTYPAGE2;
243
244typedef _COM_interface IPicture *LPPICTURE;
245typedef _COM_interface IPictureDisp *LPPICTUREDISP;
246typedef long OLE_XPOS_PIXELS;
247typedef long OLE_YPOS_PIXELS;
248typedef long OLE_XSIZE_PIXELS;
249typedef long OLE_YSIZE_PIXELS;
250typedef float OLE_XPOS_CONTAINER;
251typedef float OLE_YPOS_CONTAINER;
252typedef float OLE_XSIZE_CONTAINER;
253
254typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
255typedef VARIANT_BOOL OLE_CANCELBOOL;
256typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
257
258#pragma pack(push,8)
259typedef enum { triUnchecked,triChecked1,triGray } OLE_TRISTATE;
260typedef struct tagOCPFIPARAMS {
261 ULONG cbStructSize;
262 HWND hWndOwner;
263 int x;
264 int y;
265 LPCOLESTR lpszCaption;
266 ULONG cObjects;
267 LPUNKNOWN *lplpUnk;
268 ULONG cPages;
269 CLSID *lpPages;
270 LCID lcid;
271 DISPID dispidInitialProperty;
272} OCPFIPARAMS,*LPOCPFIPARAMS;
273typedef struct tagFONTDESC {
274 UINT cbSizeofstruct;
275 LPOLESTR lpstrName;
276 CY cySize;
277 SHORT sWeight;
278 SHORT sCharset;
279 BOOL fItalic;
280 BOOL fUnderline;
281 BOOL fStrikethrough;
282} FONTDESC,*LPFONTDESC;
283typedef struct tagPICTDESC {
284 UINT cbSizeofstruct;
285 UINT picType;
286 _ANONYMOUS_UNION union {
287 struct {
288 HBITMAP hbitmap;
289 HPALETTE hpal;
290 } bmp;
291 struct {
292 HMETAFILE hmeta;
293 int xExt;
294 int yExt;
295 } wmf;
296 struct {
297 HICON hicon;
298 } icon;
299 struct {
300 HENHMETAFILE hemf;
301 } emf;
302 } DUMMYUNIONNAME;
303} PICTDESC,*LPPICTDESC;
304#pragma pack(pop)
305
306STDAPI DllRegisterServer(void);
307STDAPI DllUnregisterServer(void);
308STDAPI OleCreateFontIndirect(LPFONTDESC,REFIID,PVOID*);
309STDAPI OleCreatePictureIndirect(LPPICTDESC,REFIID,BOOL,PVOID*);
310STDAPI OleCreatePropertyFrame(HWND,UINT,UINT,LPCOLESTR,ULONG,LPUNKNOWN*,ULONG,LPCLSID,LCID,DWORD,PVOID);
311STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS);
312STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE,HICON);
313STDAPI OleLoadPicture(LPSTREAM,LONG,BOOL,REFIID,PVOID*);
314STDAPI OleLoadPictureEx(LPSTREAM,LONG,BOOL,REFIID,DWORD,DWORD,DWORD,LPVOID*);
315STDAPI OleLoadPicturePath(LPOLESTR,LPUNKNOWN,DWORD,OLE_COLOR,REFIID,LPVOID*);
316STDAPI OleLoadPictureFile(VARIANT,LPDISPATCH*);
317STDAPI OleLoadPictureFileEx(VARIANT,DWORD,DWORD,DWORD,LPDISPATCH*);
318STDAPI OleSavePictureFile(LPDISPATCH,BSTR);
319STDAPI OleTranslateColor(OLE_COLOR,HPALETTE,COLORREF*);
320#ifdef __cplusplus
321}
322#endif
323#endif
Note: See TracBrowser for help on using the repository browser.