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