LPARAM in find dialog wm_initdialog is the find/replace structure, not
[wine] / include / olectl.h
1 #ifndef __WINE_OLECTL_H
2 #define __WINE_OLECTL_H
3
4 #include "windef.h"
5 #include "ocidl.h"
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11
12
13 /*
14  * Ole Control Interfaces
15  */
16 DEFINE_GUID(CLSID_ConvertVBX,
17             0xfb8f0822,0x0164,0x101b,0x84,0xed,0x08,0x00,0x2b,0x2e,0xc7,0x13);
18 DEFINE_GUID(CLSID_PersistPropset,
19             0xfb8f0821,0x0164,0x101b,0x84,0xed,0x08,0x00,0x2b,0x2e,0xc7,0x13);
20
21 DEFINE_GUID(CLSID_StdFont,
22             0x0be35203,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
23 DEFINE_GUID(CLSID_StdPicture,
24             0x0be35204,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
25
26 DEFINE_GUID(CLSID_CFontPropPage,
27             0x0be35200,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
28 DEFINE_GUID(CLSID_CColorPropPage,
29             0x0be35201,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
30 DEFINE_GUID(CLSID_CPicturePropPage,
31             0x0be35202,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
32
33 DEFINE_GUID(GUID_HIMETRIC,
34             0x66504300,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
35 DEFINE_GUID(GUID_COLOR,
36             0x66504301,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
37 DEFINE_GUID(GUID_XPOSPIXEL,
38             0x66504302,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
39 DEFINE_GUID(GUID_YPOSPIXEL,
40             0x66504303,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
41 DEFINE_GUID(GUID_XSIZEPIXEL,
42             0x66504304,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
43 DEFINE_GUID(GUID_YSIZEPIXEL,
44             0x66504305,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
45 DEFINE_GUID(GUID_XPOS,
46             0x66504306,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
47 DEFINE_GUID(GUID_YPOS,
48             0x66504307,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
49 DEFINE_GUID(GUID_XSIZE,
50             0x66504308,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
51 DEFINE_GUID(GUID_YSIZE,
52             0x66504309,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
53  
54 typedef struct tagOCPFIPARAMS
55 {
56         ULONG cbStructSize;
57         HWND hWndOwner;
58         int x;
59         int y;
60         LPCOLESTR lpszCaption;
61         ULONG cObjects;
62         LPUNKNOWN *lplpUnk;
63         ULONG cPages;
64         CLSID *lpPages;
65         LCID lcid;
66         DISPID dispidInitialProperty;
67 } OCPFIPARAMS, *LPOCPFIPARAMS;
68
69 /*
70  * FONTDESC is used as an OLE encapsulation of the GDI fonts
71  */
72 typedef struct tagFONTDESC {
73   UINT     cbSizeofstruct;
74   LPOLESTR lpstrName;
75   CY         cySize;
76   SHORT      sWeight;
77   SHORT      sCharset;
78   BOOL     fItalic;
79   BOOL     fUnderline;
80   BOOL     fStrikethrough;
81 } FONTDESC, *LPFONTDESC;
82
83 #define FONTSIZE(n) { n##0000, 0 }
84
85 #define PICTYPE_UNINITIALIZED (-1)
86 #define PICTYPE_NONE          0
87 #define PICTYPE_BITMAP        1
88 #define PICTYPE_METAFILE      2
89 #define PICTYPE_ICON          3
90 #define PICTYPE_ENHMETAFILE   4
91
92 typedef struct tagPICTDESC {
93         UINT cbSizeofstruct;
94         UINT picType;
95         union {
96                         struct {
97                                         HBITMAP hbitmap;
98                                         HPALETTE hpal;
99                         } bmp;
100                         struct {
101                                         HMETAFILE hmeta;
102                                         int xExt;
103                                         int yExt;
104                         } wmf;
105                         struct {
106                                         HICON hicon;
107                         } icon;
108                         struct {
109                                         HENHMETAFILE hemf;
110                         } emf;
111         } DUMMYUNIONNAME;
112 } PICTDESC, *LPPICTDESC;
113
114 typedef long OLE_XPOS_PIXELS;
115 typedef long OLE_YPOS_PIXELS;
116 typedef long OLE_XSIZE_PIXELS;
117 typedef long OLE_YSIZE_PIXELS;
118 typedef float OLE_XPOS_CONTAINER;
119 typedef float OLE_YPOS_CONTAINER;
120 typedef float OLE_XSIZE_CONTAINER;
121 typedef float OLE_YSIZE_CONTAINER;
122
123 typedef enum
124 {
125         triUnchecked = 0,
126         triChecked = 1,
127         triGray = 2
128 } OLE_TRISTATE;
129
130 typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
131 typedef VARIANT_BOOL OLE_CANCELBOOL;
132 typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
133
134 HCURSOR WINAPI OleIconToCursor( HINSTANCE hinstExe, HICON hicon);
135
136 HRESULT WINAPI OleCreatePropertyFrameIndirect( LPOCPFIPARAMS lpParams);
137
138 HRESULT WINAPI OleCreatePropertyFrame(
139         HWND hwndOwner, UINT x, UINT y, 
140         LPCOLESTR lpszCaption, ULONG cObjects, LPUNKNOWN* ppUnk, 
141         ULONG cPages, LPCLSID pPageClsID, LCID lcid, DWORD dwReserved, 
142         LPVOID pvReserved );
143
144 HRESULT WINAPI OleLoadPicture(  LPSTREAM lpstream, LONG lSize, BOOL fRunmode, 
145                 REFIID reed, LPVOID *lplpvObj );
146
147 HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid, 
148                 BOOL fOwn, LPVOID * lplpvObj );
149
150 HRESULT WINAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid, 
151                 LPVOID* lplpvObj);
152
153 HRESULT WINAPI OleTranslateColor( OLE_COLOR clr, HPALETTE hpal,
154                 COLORREF* lpcolorref);
155
156 /* standard dispatch ID's */
157 #define DISPID_AUTOSIZE                 (-500)
158 #define DISPID_BACKCOLOR                (-501)
159 #define DISPID_BACKSTYLE                (-502)
160 #define DISPID_BORDERCOLOR              (-503)
161 #define DISPID_BORDERSTYLE              (-504)
162 #define DISPID_BORDERWIDTH              (-505)
163 #define DISPID_DRAWMODE                 (-507)
164 #define DISPID_DRAWSTYLE                (-508)
165 #define DISPID_DRAWWIDTH                (-509)
166 #define DISPID_FILLCOLOR                (-510)
167 #define DISPID_FILLSTYLE                (-511)
168 #define DISPID_FONT                     (-512)
169 #define DISPID_FORECOLOR                (-513)
170 #define DISPID_ENABLED                  (-514)
171 #define DISPID_HWND                     (-515)
172 #define DISPID_TABSTOP                  (-516)
173 #define DISPID_TEXT                     (-517)
174 #define DISPID_CAPTION                  (-518)
175 #define DISPID_BORDERVISIBLE            (-519)
176 #define DISPID_APPEARANCE               (-520)
177 #define DISPID_MOUSEPOINTER             (-521)
178 #define DISPID_MOUSEICON                (-522)
179 #define DISPID_PICTURE                  (-523)
180 #define DISPID_VALID                    (-524)
181 #define DISPID_READYSTATE               (-525)
182
183 #define DISPID_REFRESH                  (-550)
184 #define DISPID_DOCLICK                  (-551)
185 #define DISPID_ABOUTBOX                 (-552)
186
187 #define DISPID_CLICK                    (-600)
188 #define DISPID_DBLCLICK                 (-601)
189 #define DISPID_KEYDOWN                  (-602)
190 #define DISPID_KEYPRESS                 (-603)
191 #define DISPID_KEYUP                    (-604)
192 #define DISPID_MOUSEDOWN                (-605)
193 #define DISPID_MOUSEMOVE                (-606)
194 #define DISPID_MOUSEUP                  (-607)
195 #define DISPID_ERROREVENT               (-608)
196 #define DISPID_READYSTATECHANGE         (-609)
197
198 #define DISPID_AMBIENT_BACKCOLOR        (-701)
199 #define DISPID_AMBIENT_DISPLAYNAME      (-702)
200 #define DISPID_AMBIENT_FONT             (-703)
201 #define DISPID_AMBIENT_FORECOLOR        (-704)
202 #define DISPID_AMBIENT_LOCALEID         (-705)
203 #define DISPID_AMBIENT_MESSAGEREFLECT   (-706)
204 #define DISPID_AMBIENT_SCALEUNITS       (-707)
205 #define DISPID_AMBIENT_TEXTALIGN        (-708)
206 #define DISPID_AMBIENT_USERMODE         (-709)
207 #define DISPID_AMBIENT_UIDEAD           (-710)
208 #define DISPID_AMBIENT_SHOWGRABHANDLES  (-711)
209 #define DISPID_AMBIENT_SHOWHATCHING     (-712)
210 #define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
211 #define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
212 #define DISPID_AMBIENT_AUTOCLIP         (-715)
213 #define DISPID_AMBIENT_APPEARANCE       (-716)
214 #define DISPID_AMBIENT_PALETTE          (-726)
215 #define DISPID_AMBIENT_TRANSFERPRIORITY (-728)
216
217 #define DISPID_Name                     (-800)
218 #define DISPID_Delete                   (-801)
219 #define DISPID_Object                   (-802)
220 #define DISPID_Parent                   (-803)
221
222 #define DISPID_FONT_NAME 0
223 #define DISPID_FONT_SIZE 2
224 #define DISPID_FONT_BOLD 3
225 #define DISPID_FONT_ITALIC 4
226 #define DISPID_FONT_UNDER 5
227 #define DISPID_FONT_STRIKE 6
228 #define DISPID_FONT_WEIGHT 7
229 #define DISPID_FONT_CHARSET 8
230  
231 /* Reflected Window Message IDs */
232 #define OCM__BASE           (WM_USER+0x1c00)
233 #define OCM_COMMAND         (OCM__BASE + WM_COMMAND)
234
235 #define OCM_CTLCOLORBTN     (OCM__BASE + WM_CTLCOLORBTN)
236 #define OCM_CTLCOLOREDIT    (OCM__BASE + WM_CTLCOLOREDIT)
237 #define OCM_CTLCOLORDLG     (OCM__BASE + WM_CTLCOLORDLG)
238 #define OCM_CTLCOLORLISTBOX (OCM__BASE + WM_CTLCOLORLISTBOX)
239 #define OCM_CTLCOLORMSGBOX  (OCM__BASE + WM_CTLCOLORMSGBOX)
240 #define OCM_CTLCOLORSCROLLBAR   (OCM__BASE + WM_CTLCOLORSCROLLBAR)
241 #define OCM_CTLCOLORSTATIC  (OCM__BASE + WM_CTLCOLORSTATIC)
242
243 #define OCM_DRAWITEM        (OCM__BASE + WM_DRAWITEM)
244 #define OCM_MEASUREITEM     (OCM__BASE + WM_MEASUREITEM)
245 #define OCM_DELETEITEM      (OCM__BASE + WM_DELETEITEM)
246 #define OCM_VKEYTOITEM      (OCM__BASE + WM_VKEYTOITEM)
247 #define OCM_CHARTOITEM      (OCM__BASE + WM_CHARTOITEM)
248 #define OCM_COMPAREITEM     (OCM__BASE + WM_COMPAREITEM)
249 #define OCM_HSCROLL         (OCM__BASE + WM_HSCROLL)
250 #define OCM_VSCROLL         (OCM__BASE + WM_VSCROLL)
251 #define OCM_PARENTNOTIFY    (OCM__BASE + WM_PARENTNOTIFY)
252 #define OCM_NOTIFY            (OCM__BASE + WM_NOTIFY)
253
254 #define CONNECT_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
255 #define CONNECT_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
256 #define CONNECT_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
257 #define CONNECT_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
258
259 #define CONNECT_E_NOCONNECTION      (CONNECT_E_FIRST+0)
260 #define CONNECT_E_ADVISELIMIT       (CONNECT_E_FIRST+1)
261 #define CONNECT_E_CANNOTCONNECT     (CONNECT_E_FIRST+2)
262 #define CONNECT_E_OVERRIDDEN        (CONNECT_E_FIRST+3)
263
264 #define SELFREG_E_FIRST             MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
265 #define SELFREG_E_LAST              MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
266 #define SELFREG_S_FIRST             MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
267 #define SELFREG_S_LAST              MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
268 #define SELFREG_E_TYPELIB           (SELFREG_E_FIRST+0)
269 #define SELFREG_E_CLASS             (SELFREG_E_FIRST+1)
270
271 #ifndef FACILITY_CONTROL
272 #define FACILITY_CONTROL 0xa
273 #endif
274 #define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
275 #define CTL_E_ILLEGALFUNCTIONCALL       STD_CTL_SCODE(5)
276 #define CTL_E_OVERFLOW                  STD_CTL_SCODE(6)
277 #define CTL_E_OUTOFMEMORY               STD_CTL_SCODE(7)
278 #define CTL_E_DIVISIONBYZERO            STD_CTL_SCODE(11)
279 #define CTL_E_OUTOFSTRINGSPACE          STD_CTL_SCODE(14)
280 #define CTL_E_OUTOFSTACKSPACE           STD_CTL_SCODE(28)
281 #define CTL_E_BADFILENAMEORNUMBER       STD_CTL_SCODE(52)
282 #define CTL_E_FILENOTFOUND              STD_CTL_SCODE(53)
283 #define CTL_E_BADFILEMODE               STD_CTL_SCODE(54)
284 #define CTL_E_FILEALREADYOPEN           STD_CTL_SCODE(55)
285 #define CTL_E_DEVICEIOERROR             STD_CTL_SCODE(57)
286 #define CTL_E_FILEALREADYEXISTS         STD_CTL_SCODE(58)
287 #define CTL_E_BADRECORDLENGTH           STD_CTL_SCODE(59)
288 #define CTL_E_DISKFULL                  STD_CTL_SCODE(61)
289 #define CTL_E_BADRECORDNUMBER           STD_CTL_SCODE(63)
290 #define CTL_E_BADFILENAME               STD_CTL_SCODE(64)
291 #define CTL_E_TOOMANYFILES              STD_CTL_SCODE(67)
292 #define CTL_E_DEVICEUNAVAILABLE         STD_CTL_SCODE(68)
293 #define CTL_E_PERMISSIONDENIED          STD_CTL_SCODE(70)
294 #define CTL_E_DISKNOTREADY              STD_CTL_SCODE(71)
295 #define CTL_E_PATHFILEACCESSERROR       STD_CTL_SCODE(75)
296 #define CTL_E_PATHNOTFOUND              STD_CTL_SCODE(76)
297 #define CTL_E_INVALIDPATTERNSTRING      STD_CTL_SCODE(93)
298 #define CTL_E_INVALIDUSEOFNULL          STD_CTL_SCODE(94)
299 #define CTL_E_INVALIDFILEFORMAT         STD_CTL_SCODE(321)
300 #define CTL_E_INVALIDPROPERTYVALUE      STD_CTL_SCODE(380)
301 #define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
302 #define CTL_E_SETNOTSUPPORTEDATRUNTIME  STD_CTL_SCODE(382)
303 #define CTL_E_SETNOTSUPPORTED           STD_CTL_SCODE(383)
304 #define CTL_E_NEEDPROPERTYARRAYINDEX    STD_CTL_SCODE(385)
305 #define CTL_E_SETNOTPERMITTED           STD_CTL_SCODE(387)
306 #define CTL_E_GETNOTSUPPORTEDATRUNTIME  STD_CTL_SCODE(393)
307 #define CTL_E_GETNOTSUPPORTED           STD_CTL_SCODE(394)
308 #define CTL_E_PROPERTYNOTFOUND          STD_CTL_SCODE(422)
309 #define CTL_E_INVALIDCLIPBOARDFORMAT    STD_CTL_SCODE(460)
310 #define CTL_E_INVALIDPICTURE            STD_CTL_SCODE(481)
311 #define CTL_E_PRINTERERROR              STD_CTL_SCODE(482)
312 #define CTL_E_CANTSAVEFILETOTEMP        STD_CTL_SCODE(735)
313 #define CTL_E_SEARCHTEXTNOTFOUND        STD_CTL_SCODE(744)
314 #define CTL_E_REPLACEMENTSTOOLONG       STD_CTL_SCODE(746)
315
316 #define VT_COLOR            VT_I4
317 #define VT_FONT             VT_DISPATCH
318 #define VT_STREAMED_PROPSET 73  /*       [P]  Stream contains a property set */
319 #define VT_STORED_PROPSET   74  /*       [P]  Storage contains a property set */
320 #define VT_BLOB_PROPSET     75  /*       [P]  Blob contains a property set */
321 #define VT_VERBOSE_ENUM     76  /*       [P]  Enum value with text string */
322
323 #define PERPROP_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
324 #define PERPROP_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
325 #define PERPROP_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
326 #define PERPROP_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
327
328 #define PERPROP_E_NOPAGEAVAILABLE   (PERPROP_E_FIRST+0)
329
330
331 #ifdef __cplusplus
332 }
333 #endif
334
335 #endif /*  __WINE_OLECTL_H */
336
337