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