]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/missing.h
changing wxxVariant signature
[wxWidgets.git] / include / wx / msw / missing.h
CommitLineData
7391216e 1/////////////////////////////////////////////////////////////////////////////
05e3a383 2// Name: wx/msw/missing.h
7391216e 3// Purpose: Declarations for parts of the Win32 SDK that are missing in
05e3a383 4// the versions that come with some compilers
7391216e
VS
5// Created: 2002/04/23
6// RCS-ID: $Id$
05e3a383 7// Copyright: (c) 2002 Mattia Barbon
7391216e
VS
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_MISSING_H_
12#define _WX_MISSING_H_
13
14// ----------------------------------------------------------------------------
15// ListView common control
16// ----------------------------------------------------------------------------
17
18#ifndef LVHT_ONITEM
19 #define LVHT_ONITEM \
20 (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
21#endif
22
23#ifndef LVM_SETEXTENDEDLISTVIEWSTYLE
24 #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54)
25#endif
26
27#ifndef LVS_EX_FULLROWSELECT
28 #define LVS_EX_FULLROWSELECT 0x00000020
29#endif
30
31#ifndef LVS_OWNERDATA
32 #define LVS_OWNERDATA 0x1000
33#endif
34
35#ifndef LVM_FIRST
36 #define LVM_FIRST 0x1000
37#endif
38
39#ifndef HDM_FIRST
40 #define HDM_FIRST 0x1200
41#endif
42
0b190ffc
RD
43#ifndef LVCFMT_JUSTIFYMASK
44 #define LVCFMT_JUSTIFYMASK 0x0003
45#endif
46
d9ef4e06
VZ
47#ifndef LVSICF_NOSCROLL
48 #define LVSICF_NOSCROLL 0x0002
49#endif
50
7391216e
VS
51// mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff
52#ifndef NM_CACHEHINT
53 typedef struct tagNMLVCACHEHINT
54 {
55 NMHDR hdr;
56 int iFrom;
57 int iTo;
58 } NMLVCACHEHINT;
59
60 #define NM_CACHEHINT NMLVCACHEHINT
61#endif
62
63#ifndef LVN_ODCACHEHINT
64 #define LVN_ODCACHEHINT (-113)
65#endif
66
67#ifndef ListView_GetHeader
68 #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0)
69#endif
70
71#ifndef LVM_GETHEADER
72 #define LVM_GETHEADER (LVM_FIRST+31)
73#endif
74
75#ifndef Header_GetItemRect
76 #define Header_GetItemRect(w,i,r) \
77 (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
78#endif
79
80#ifndef HDM_GETITEMRECT
81 #define HDM_GETITEMRECT (HDM_FIRST+7)
82#endif
83
84#ifndef LVCF_IMAGE
85 #define LVCF_IMAGE 0x0010
86#endif
87
88#ifndef LVCFMT_BITMAP_ON_RIGHT
89 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
90#endif
91
92#if defined(__GNUWIN32__) && !defined(LV_ITEM) \
93 && !wxCHECK_W32API_VERSION( 0, 5 )
94typedef struct _LVITEMW {
95 UINT mask;
96 int iItem;
97 int iSubItem;
98 UINT state;
99 UINT stateMask;
100 LPWSTR pszText;
101 int cchTextMax;
102 int iImage;
103 LPARAM lParam;
104#if (_WIN32_IE >= 0x0300)
105 int iIndent;
106#endif
107} LV_ITEMW;
eaeeb91e
JS
108
109typedef struct tagLVITEMA
110{
111 UINT mask;
112 int iItem;
113 int iSubItem;
114 UINT state;
115 UINT stateMask;
116 LPSTR pszText;
117 int cchTextMax;
118 int iImage;
119 LPARAM lParam;
120#if (_WIN32_IE >= 0x0300)
121 int iIndent;
122#endif
123} LV_ITEMA;
124
125#define LV_ITEM LV_ITEMA;
7391216e
VS
126#endif
127
3bce6687
JS
128#ifndef ListView_GetColumnWidth
129#define ListView_GetColumnWidth(hwnd, iCol) \
130 (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
131#endif
132
133#ifndef ListView_SetColumnWidth
134#define ListView_SetColumnWidth(hwnd, iCol, cx) \
135 (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
136#endif
137
138#ifndef ListView_GetTextColor
139#define ListView_GetTextColor(hwnd) \
140 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
141#endif
142
143#ifndef ListView_FindItem
144#define ListView_FindItem(hwnd, iStart, plvfi) \
145 (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO FAR*)(plvfi))
146#endif
147
7391216e
VS
148#if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
149#ifndef LV_DISPINFOA
150typedef struct tagNMLVDISPINFOA {
151 NMHDR hdr;
152 LV_ITEMA item;
153} NMLVDISPINFOA, FAR *LPNMLVDISPINFOA;
154#define _LV_DISPINFOA tagNMLVDISPINFOA
155#define LV_DISPINFOA NMLVDISPINFOA
156#endif
157#ifndef LV_DISPINFOW
158typedef struct tagNMLVDISPINFOW {
159 NMHDR hdr;
160 LV_ITEMW item;
161} NMLVDISPINFOW, FAR *LPNMLVDISPINFOW;
162#define _LV_DISPINFOW tagNMLVDISPINFOW
163#define LV_DISPINFOW NMLVDISPINFOW
164#endif
165#endif
166
ba0d56c3 167#if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined (__MINGW32__) || defined(__DIGITALMARS__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
2b5f62a0 168#define HDN_GETDISPINFOW (HDN_FIRST-29)
49bbd59b 169#if !wxCHECK_W32API_VERSION(2, 2)
2b5f62a0
VZ
170typedef struct {
171 NMHDR hdr;
172 int iItem;
173 UINT mask;
174 LPWSTR pszText;
175 int cchTextMax;
176 int iImage;
177 LPARAM lParam;
178} NMHDDISPINFOW, *LPNMHDDISPINFOW;
179#endif
49bbd59b 180#endif
2b5f62a0 181
dd54f5d3
CE
182// ----------------------------------------------------------------------------
183// Toolbar define value missing
184// ----------------------------------------------------------------------------
185#if defined(__DIGITALMARS__)
186#define CCS_VERT 0x00000080L
187#endif
7391216e
VS
188
189// ----------------------------------------------------------------------------
190// MS HTML Help
191// ----------------------------------------------------------------------------
192
193// instead of including htmlhelp.h, duplicate the things from it we need here:
194
195enum
196{
197 HH_DISPLAY_TOPIC,
198 HH_DISPLAY_TOC,
199 HH_DISPLAY_INDEX,
200 HH_DISPLAY_SEARCH,
201 HH_SET_WIN_TYPE,
202 HH_GET_WIN_TYPE,
203 HH_GET_WIN_HANDLE,
204 HH_ENUM_INFO_TYPE,
205 HH_SET_INFO_TYPE,
206 HH_SYNC,
207 HH_RESERVED1,
208 HH_RESERVED2,
209 HH_RESERVED3,
210 HH_KEYWORD_LOOKUP,
211 HH_DISPLAY_TEXT_POPUP,
212 HH_HELP_CONTEXT,
213 HH_TP_HELP_CONTEXTMENU,
214 HH_TP_HELP_WM_HELP,
215 HH_CLOSE_ALL,
216 HH_ALINK_LOOKUP,
217 HH_GET_LAST_ERROR,
218 HH_ENUM_CATEGORY,
219 HH_ENUM_CATEGORY_IT,
220 HH_RESET_IT_FILTER,
221 HH_SET_INCLUSIVE_FILTER,
222 HH_SET_EXCLUSIVE_FILTER
223};
224
225struct HH_POPUP
226{
227 int cbStruct;
228 HINSTANCE hinst;
229 UINT idString;
230 LPCTSTR pszText;
231 POINT pt;
232 COLORREF clrForeground;
233 COLORREF clrBackground;
234 RECT rcMargins;
235 LPCTSTR pszFont;
236};
237
238struct HH_AKLINK
239{
240 int cbStruct;
241 BOOL fReserved;
242 LPCTSTR pszKeywords;
243 LPCTSTR pszUrl;
244 LPCTSTR pszMsgText;
245 LPCTSTR pszMsgTitle;
246 LPCTSTR pszWindow;
247 BOOL fIndexOnFail;
248};
249
e2478fde
VZ
250// ----------------------------------------------------------------------------
251// SHGetFileInfo-related things
252// ----------------------------------------------------------------------------
253
254#ifndef SHGetFileInfo
255 #ifdef UNICODE
256 #define SHGetFileInfo SHGetFileInfoW
257 #else
258 #define SHGetFileInfo SHGetFileInfoA
259 #endif
260#endif
261
262#ifndef SHGFI_ATTRIBUTES
263 #define SHGFI_ATTRIBUTES 2048
264#endif
265
266#ifndef SFGAO_READONLY
267 #define SFGAO_READONLY 0x00040000L
268#endif
269
270#ifndef SFGAO_REMOVABLE
271 #define SFGAO_REMOVABLE 0x02000000L
272#endif
273
274#ifndef SHGFI_DISPLAYNAME
275 #define SHGFI_DISPLAYNAME 512
276#endif
277
278#ifndef SHGFI_ICON
279 #define SHGFI_ICON 256
280#endif
281
282#ifndef SHGFI_SMALLICON
283 #define SHGFI_SMALLICON 1
284#endif
285
286#ifndef SHGFI_SHELLICONSIZE
287 #define SHGFI_SHELLICONSIZE 4
288#endif
289
290#ifndef SHGFI_OPENICON
291 #define SHGFI_OPENICON 2
292#endif
293
3ec4107d
MB
294// ----------------------------------------------------------------------------
295// Rich text control
296// ----------------------------------------------------------------------------
297
298#if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
299
300// old mingw32 doesn't define this
301#ifndef CFM_CHARSET
302 #define CFM_CHARSET 0x08000000
303#endif // CFM_CHARSET
304
305#ifndef CFM_BACKCOLOR
306 #define CFM_BACKCOLOR 0x04000000
307#endif
308
309// cygwin does not have these defined for richedit
310#ifndef ENM_LINK
311 #define ENM_LINK 0x04000000
312#endif
313
314#ifndef EM_AUTOURLDETECT
315 #define EM_AUTOURLDETECT (WM_USER + 91)
316#endif
317
318#ifndef EN_LINK
319 #define EN_LINK 0x070b
320
321 typedef struct _enlink
322 {
323 NMHDR nmhdr;
324 UINT msg;
325 WPARAM wParam;
326 LPARAM lParam;
327 CHARRANGE chrg;
328 } ENLINK;
329#endif // ENLINK
330
331#ifndef SF_UNICODE
332 #define SF_UNICODE 0x0010
333#endif
334
335// Watcom C++ doesn't define this
336#ifndef SCF_ALL
337 #define SCF_ALL 0x0004
338#endif
339
340#ifndef PFA_JUSTIFY
341#define PFA_JUSTIFY 4
342
343typedef struct _paraformat2 {
344 UINT cbSize;
345 DWORD dwMask;
346 WORD wNumbering;
347 WORD wEffects;
348 LONG dxStartIndent;
349 LONG dxRightIndent;
350 LONG dxOffset;
351 WORD wAlignment;
352 SHORT cTabCount;
353 LONG rgxTabs[MAX_TAB_STOPS];
354 LONG dySpaceBefore;
355 LONG dySpaceAfter;
356 LONG dyLineSpacing;
357 SHORT sStype;
358 BYTE bLineSpacingRule;
359 BYTE bOutlineLevel;
360 WORD wShadingWeight;
361 WORD wShadingStyle;
362 WORD wNumberingStart;
363 WORD wNumberingStyle;
364 WORD wNumberingTab;
365 WORD wBorderSpace;
366 WORD wBorderWidth;
367 WORD wBorders;
368} PARAFORMAT2;
369#define wxEffects wReserved
370
371#endif
372
e2478fde 373#endif // wxUSE_RICHEDIT
17b439e8 374
e5898961
MB
375// ----------------------------------------------------------------------------
376// ToolBar
377// ----------------------------------------------------------------------------
378
379#if wxUSE_TOOLBAR
380
381#if !defined(TBIF_SIZE)
382
383#define TBIF_SIZE 64
384#define TB_SETBUTTONINFO (WM_USER+66)
385
386typedef struct {
387 UINT cbSize;
388 DWORD dwMask;
389 int idCommand;
390 int iImage;
391 BYTE fsState;
392 BYTE fsStyle;
393 WORD cx;
394 DWORD lParam;
395 LPTSTR pszText;
396 int cchText;
397} TBBUTTONINFO, *LPTBBUTTONINFO;
398
399#endif // !defined(TBIF_SIZE)
400
401#endif // wxUSE_TOOLBAR
402
05e3a383
VZ
403// ----------------------------------------------------------------------------
404// Tree control
405// ----------------------------------------------------------------------------
406
407#ifndef TVIS_FOCUSED
408 #define TVIS_FOCUSED 0x0001
409#endif
410
411#ifndef TV_FIRST
412 #define TV_FIRST 0x1100
413#endif
414
415#ifndef TVS_CHECKBOXES
416 #define TVS_CHECKBOXES 0x0100
417#endif
418
419#ifndef TVS_FULLROWSELECT
420 #define TVS_FULLROWSELECT 0x1000
421#endif
422
423#ifndef TVM_SETBKCOLOR
424 #define TVM_SETBKCOLOR (TV_FIRST + 29)
425 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
426#endif
427
17b439e8
VS
428// ----------------------------------------------------------------------------
429// Misc stuff
430// ----------------------------------------------------------------------------
431
432#ifndef QS_ALLPOSTMESSAGE
433 #define QS_ALLPOSTMESSAGE 0x0100
434#endif
435
c4e54c6d
VZ
436#ifndef WS_EX_CLIENTEDGE
437 #define WS_EX_CLIENTEDGE 0x00000200L
438#endif
439
440#ifndef ENDSESSION_LOGOFF
441 #define ENDSESSION_LOGOFF 0x80000000
442#endif
443
fcd0c90f
MB
444#ifndef HANGUL_CHARSET
445 #define HANGUL_CHARSET 129
446#endif
447
7391216e
VS
448#endif
449 // _WX_MISSING_H_