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