]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/missing.h
renamed WX_DEFINE_ARRAY_NO_PTR in WX_DEFINE_ARRAY_PTR
[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
521e585f
VZ
182#ifndef LVM_SETUNICODEFORMAT
183#define LVM_SETUNICODEFORMAT 0x2005
184#endif
185
dd54f5d3
CE
186// ----------------------------------------------------------------------------
187// Toolbar define value missing
188// ----------------------------------------------------------------------------
385facb7 189#if !defined(CCS_VERT)
dd54f5d3
CE
190#define CCS_VERT 0x00000080L
191#endif
7391216e
VS
192
193// ----------------------------------------------------------------------------
194// MS HTML Help
195// ----------------------------------------------------------------------------
196
197// instead of including htmlhelp.h, duplicate the things from it we need here:
198
199enum
200{
201 HH_DISPLAY_TOPIC,
202 HH_DISPLAY_TOC,
203 HH_DISPLAY_INDEX,
204 HH_DISPLAY_SEARCH,
205 HH_SET_WIN_TYPE,
206 HH_GET_WIN_TYPE,
207 HH_GET_WIN_HANDLE,
208 HH_ENUM_INFO_TYPE,
209 HH_SET_INFO_TYPE,
210 HH_SYNC,
211 HH_RESERVED1,
212 HH_RESERVED2,
213 HH_RESERVED3,
214 HH_KEYWORD_LOOKUP,
215 HH_DISPLAY_TEXT_POPUP,
216 HH_HELP_CONTEXT,
217 HH_TP_HELP_CONTEXTMENU,
218 HH_TP_HELP_WM_HELP,
219 HH_CLOSE_ALL,
220 HH_ALINK_LOOKUP,
221 HH_GET_LAST_ERROR,
222 HH_ENUM_CATEGORY,
223 HH_ENUM_CATEGORY_IT,
224 HH_RESET_IT_FILTER,
225 HH_SET_INCLUSIVE_FILTER,
226 HH_SET_EXCLUSIVE_FILTER
227};
228
229struct HH_POPUP
230{
231 int cbStruct;
232 HINSTANCE hinst;
233 UINT idString;
234 LPCTSTR pszText;
235 POINT pt;
236 COLORREF clrForeground;
237 COLORREF clrBackground;
238 RECT rcMargins;
239 LPCTSTR pszFont;
240};
241
242struct HH_AKLINK
243{
244 int cbStruct;
245 BOOL fReserved;
246 LPCTSTR pszKeywords;
247 LPCTSTR pszUrl;
248 LPCTSTR pszMsgText;
249 LPCTSTR pszMsgTitle;
250 LPCTSTR pszWindow;
251 BOOL fIndexOnFail;
252};
253
e2478fde
VZ
254// ----------------------------------------------------------------------------
255// SHGetFileInfo-related things
256// ----------------------------------------------------------------------------
257
258#ifndef SHGetFileInfo
259 #ifdef UNICODE
260 #define SHGetFileInfo SHGetFileInfoW
261 #else
262 #define SHGetFileInfo SHGetFileInfoA
263 #endif
264#endif
265
266#ifndef SHGFI_ATTRIBUTES
267 #define SHGFI_ATTRIBUTES 2048
268#endif
269
270#ifndef SFGAO_READONLY
271 #define SFGAO_READONLY 0x00040000L
272#endif
273
274#ifndef SFGAO_REMOVABLE
275 #define SFGAO_REMOVABLE 0x02000000L
276#endif
277
278#ifndef SHGFI_DISPLAYNAME
279 #define SHGFI_DISPLAYNAME 512
280#endif
281
282#ifndef SHGFI_ICON
283 #define SHGFI_ICON 256
284#endif
285
286#ifndef SHGFI_SMALLICON
287 #define SHGFI_SMALLICON 1
288#endif
289
290#ifndef SHGFI_SHELLICONSIZE
291 #define SHGFI_SHELLICONSIZE 4
292#endif
293
294#ifndef SHGFI_OPENICON
295 #define SHGFI_OPENICON 2
296#endif
297
3ec4107d
MB
298// ----------------------------------------------------------------------------
299// Rich text control
300// ----------------------------------------------------------------------------
301
302#if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
303
304// old mingw32 doesn't define this
305#ifndef CFM_CHARSET
306 #define CFM_CHARSET 0x08000000
307#endif // CFM_CHARSET
308
309#ifndef CFM_BACKCOLOR
310 #define CFM_BACKCOLOR 0x04000000
311#endif
312
313// cygwin does not have these defined for richedit
314#ifndef ENM_LINK
315 #define ENM_LINK 0x04000000
316#endif
317
318#ifndef EM_AUTOURLDETECT
319 #define EM_AUTOURLDETECT (WM_USER + 91)
320#endif
321
322#ifndef EN_LINK
323 #define EN_LINK 0x070b
324
325 typedef struct _enlink
326 {
327 NMHDR nmhdr;
328 UINT msg;
329 WPARAM wParam;
330 LPARAM lParam;
331 CHARRANGE chrg;
332 } ENLINK;
333#endif // ENLINK
334
335#ifndef SF_UNICODE
336 #define SF_UNICODE 0x0010
337#endif
338
339// Watcom C++ doesn't define this
340#ifndef SCF_ALL
341 #define SCF_ALL 0x0004
342#endif
343
344#ifndef PFA_JUSTIFY
345#define PFA_JUSTIFY 4
346
347typedef struct _paraformat2 {
348 UINT cbSize;
349 DWORD dwMask;
350 WORD wNumbering;
351 WORD wEffects;
352 LONG dxStartIndent;
353 LONG dxRightIndent;
354 LONG dxOffset;
355 WORD wAlignment;
356 SHORT cTabCount;
357 LONG rgxTabs[MAX_TAB_STOPS];
358 LONG dySpaceBefore;
359 LONG dySpaceAfter;
360 LONG dyLineSpacing;
361 SHORT sStype;
362 BYTE bLineSpacingRule;
363 BYTE bOutlineLevel;
364 WORD wShadingWeight;
365 WORD wShadingStyle;
366 WORD wNumberingStart;
367 WORD wNumberingStyle;
368 WORD wNumberingTab;
369 WORD wBorderSpace;
370 WORD wBorderWidth;
371 WORD wBorders;
372} PARAFORMAT2;
373#define wxEffects wReserved
374
375#endif
376
e2478fde 377#endif // wxUSE_RICHEDIT
17b439e8 378
e5898961
MB
379// ----------------------------------------------------------------------------
380// ToolBar
381// ----------------------------------------------------------------------------
382
383#if wxUSE_TOOLBAR
384
385#if !defined(TBIF_SIZE)
386
387#define TBIF_SIZE 64
388#define TB_SETBUTTONINFO (WM_USER+66)
389
390typedef struct {
391 UINT cbSize;
392 DWORD dwMask;
393 int idCommand;
394 int iImage;
395 BYTE fsState;
396 BYTE fsStyle;
397 WORD cx;
398 DWORD lParam;
399 LPTSTR pszText;
400 int cchText;
401} TBBUTTONINFO, *LPTBBUTTONINFO;
402
403#endif // !defined(TBIF_SIZE)
404
405#endif // wxUSE_TOOLBAR
406
05e3a383
VZ
407// ----------------------------------------------------------------------------
408// Tree control
409// ----------------------------------------------------------------------------
410
411#ifndef TVIS_FOCUSED
412 #define TVIS_FOCUSED 0x0001
413#endif
414
415#ifndef TV_FIRST
416 #define TV_FIRST 0x1100
417#endif
418
419#ifndef TVS_CHECKBOXES
420 #define TVS_CHECKBOXES 0x0100
421#endif
422
423#ifndef TVS_FULLROWSELECT
424 #define TVS_FULLROWSELECT 0x1000
425#endif
426
427#ifndef TVM_SETBKCOLOR
428 #define TVM_SETBKCOLOR (TV_FIRST + 29)
429 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
430#endif
431
17b439e8
VS
432// ----------------------------------------------------------------------------
433// Misc stuff
434// ----------------------------------------------------------------------------
435
436#ifndef QS_ALLPOSTMESSAGE
437 #define QS_ALLPOSTMESSAGE 0x0100
438#endif
439
c4e54c6d
VZ
440#ifndef WS_EX_CLIENTEDGE
441 #define WS_EX_CLIENTEDGE 0x00000200L
442#endif
443
444#ifndef ENDSESSION_LOGOFF
445 #define ENDSESSION_LOGOFF 0x80000000
446#endif
447
fcd0c90f
MB
448#ifndef HANGUL_CHARSET
449 #define HANGUL_CHARSET 129
450#endif
451
7391216e
VS
452#endif
453 // _WX_MISSING_H_