]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/missing.h
oops, forgot default value for MemoryHDC ctor parameter
[wxWidgets.git] / include / wx / msw / missing.h
CommitLineData
7391216e
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: missing.h
3// Purpose: Declarations for parts of the Win32 SDK that are missing in
4// the version that comes with some compilers
5// Created: 2002/04/23
6// RCS-ID: $Id$
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_MISSING_H_
11#define _WX_MISSING_H_
12
13// ----------------------------------------------------------------------------
14// ListView common control
15// ----------------------------------------------------------------------------
16
17#ifndef LVHT_ONITEM
18 #define LVHT_ONITEM \
19 (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
20#endif
21
22#ifndef LVM_SETEXTENDEDLISTVIEWSTYLE
23 #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54)
24#endif
25
26#ifndef LVS_EX_FULLROWSELECT
27 #define LVS_EX_FULLROWSELECT 0x00000020
28#endif
29
30#ifndef LVS_OWNERDATA
31 #define LVS_OWNERDATA 0x1000
32#endif
33
34#ifndef LVM_FIRST
35 #define LVM_FIRST 0x1000
36#endif
37
38#ifndef HDM_FIRST
39 #define HDM_FIRST 0x1200
40#endif
41
0b190ffc
RD
42#ifndef LVCFMT_JUSTIFYMASK
43 #define LVCFMT_JUSTIFYMASK 0x0003
44#endif
45
7391216e
VS
46// mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff
47#ifndef NM_CACHEHINT
48 typedef struct tagNMLVCACHEHINT
49 {
50 NMHDR hdr;
51 int iFrom;
52 int iTo;
53 } NMLVCACHEHINT;
54
55 #define NM_CACHEHINT NMLVCACHEHINT
56#endif
57
58#ifndef LVN_ODCACHEHINT
59 #define LVN_ODCACHEHINT (-113)
60#endif
61
62#ifndef ListView_GetHeader
63 #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0)
64#endif
65
66#ifndef LVM_GETHEADER
67 #define LVM_GETHEADER (LVM_FIRST+31)
68#endif
69
70#ifndef Header_GetItemRect
71 #define Header_GetItemRect(w,i,r) \
72 (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
73#endif
74
75#ifndef HDM_GETITEMRECT
76 #define HDM_GETITEMRECT (HDM_FIRST+7)
77#endif
78
79#ifndef LVCF_IMAGE
80 #define LVCF_IMAGE 0x0010
81#endif
82
83#ifndef LVCFMT_BITMAP_ON_RIGHT
84 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
85#endif
86
87#if defined(__GNUWIN32__) && !defined(LV_ITEM) \
88 && !wxCHECK_W32API_VERSION( 0, 5 )
89typedef struct _LVITEMW {
90 UINT mask;
91 int iItem;
92 int iSubItem;
93 UINT state;
94 UINT stateMask;
95 LPWSTR pszText;
96 int cchTextMax;
97 int iImage;
98 LPARAM lParam;
99#if (_WIN32_IE >= 0x0300)
100 int iIndent;
101#endif
102} LV_ITEMW;
eaeeb91e
JS
103
104typedef struct tagLVITEMA
105{
106 UINT mask;
107 int iItem;
108 int iSubItem;
109 UINT state;
110 UINT stateMask;
111 LPSTR pszText;
112 int cchTextMax;
113 int iImage;
114 LPARAM lParam;
115#if (_WIN32_IE >= 0x0300)
116 int iIndent;
117#endif
118} LV_ITEMA;
119
120#define LV_ITEM LV_ITEMA;
7391216e
VS
121#endif
122
3bce6687
JS
123#ifndef ListView_GetColumnWidth
124#define ListView_GetColumnWidth(hwnd, iCol) \
125 (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
126#endif
127
128#ifndef ListView_SetColumnWidth
129#define ListView_SetColumnWidth(hwnd, iCol, cx) \
130 (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
131#endif
132
133#ifndef ListView_GetTextColor
134#define ListView_GetTextColor(hwnd) \
135 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
136#endif
137
138#ifndef ListView_FindItem
139#define ListView_FindItem(hwnd, iStart, plvfi) \
140 (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO FAR*)(plvfi))
141#endif
142
7391216e
VS
143#if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
144#ifndef LV_DISPINFOA
145typedef struct tagNMLVDISPINFOA {
146 NMHDR hdr;
147 LV_ITEMA item;
148} NMLVDISPINFOA, FAR *LPNMLVDISPINFOA;
149#define _LV_DISPINFOA tagNMLVDISPINFOA
150#define LV_DISPINFOA NMLVDISPINFOA
151#endif
152#ifndef LV_DISPINFOW
153typedef struct tagNMLVDISPINFOW {
154 NMHDR hdr;
155 LV_ITEMW item;
156} NMLVDISPINFOW, FAR *LPNMLVDISPINFOW;
157#define _LV_DISPINFOW tagNMLVDISPINFOW
158#define LV_DISPINFOW NMLVDISPINFOW
159#endif
160#endif
161
f72199d1 162#if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
2b5f62a0 163#define HDN_GETDISPINFOW (HDN_FIRST-29)
49bbd59b 164#if !wxCHECK_W32API_VERSION(2, 2)
2b5f62a0
VZ
165typedef struct {
166 NMHDR hdr;
167 int iItem;
168 UINT mask;
169 LPWSTR pszText;
170 int cchTextMax;
171 int iImage;
172 LPARAM lParam;
173} NMHDDISPINFOW, *LPNMHDDISPINFOW;
174#endif
49bbd59b 175#endif
2b5f62a0 176
7391216e
VS
177
178// ----------------------------------------------------------------------------
179// MS HTML Help
180// ----------------------------------------------------------------------------
181
182// instead of including htmlhelp.h, duplicate the things from it we need here:
183
184enum
185{
186 HH_DISPLAY_TOPIC,
187 HH_DISPLAY_TOC,
188 HH_DISPLAY_INDEX,
189 HH_DISPLAY_SEARCH,
190 HH_SET_WIN_TYPE,
191 HH_GET_WIN_TYPE,
192 HH_GET_WIN_HANDLE,
193 HH_ENUM_INFO_TYPE,
194 HH_SET_INFO_TYPE,
195 HH_SYNC,
196 HH_RESERVED1,
197 HH_RESERVED2,
198 HH_RESERVED3,
199 HH_KEYWORD_LOOKUP,
200 HH_DISPLAY_TEXT_POPUP,
201 HH_HELP_CONTEXT,
202 HH_TP_HELP_CONTEXTMENU,
203 HH_TP_HELP_WM_HELP,
204 HH_CLOSE_ALL,
205 HH_ALINK_LOOKUP,
206 HH_GET_LAST_ERROR,
207 HH_ENUM_CATEGORY,
208 HH_ENUM_CATEGORY_IT,
209 HH_RESET_IT_FILTER,
210 HH_SET_INCLUSIVE_FILTER,
211 HH_SET_EXCLUSIVE_FILTER
212};
213
214struct HH_POPUP
215{
216 int cbStruct;
217 HINSTANCE hinst;
218 UINT idString;
219 LPCTSTR pszText;
220 POINT pt;
221 COLORREF clrForeground;
222 COLORREF clrBackground;
223 RECT rcMargins;
224 LPCTSTR pszFont;
225};
226
227struct HH_AKLINK
228{
229 int cbStruct;
230 BOOL fReserved;
231 LPCTSTR pszKeywords;
232 LPCTSTR pszUrl;
233 LPCTSTR pszMsgText;
234 LPCTSTR pszMsgTitle;
235 LPCTSTR pszWindow;
236 BOOL fIndexOnFail;
237};
238
17b439e8
VS
239
240// ----------------------------------------------------------------------------
241// Misc stuff
242// ----------------------------------------------------------------------------
243
244#ifndef QS_ALLPOSTMESSAGE
245 #define QS_ALLPOSTMESSAGE 0x0100
246#endif
247
7391216e
VS
248#endif
249 // _WX_MISSING_H_