]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/missing.h
compilation fix for !MSVC
[wxWidgets.git] / include / wx / msw / missing.h
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
42 #ifndef LVCFMT_JUSTIFYMASK
43 #define LVCFMT_JUSTIFYMASK 0x0003
44 #endif
45
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 )
89 typedef 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;
103
104 typedef 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;
121 #endif
122
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
143 #if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
144 #ifndef LV_DISPINFOA
145 typedef 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
153 typedef 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
162
163 // ----------------------------------------------------------------------------
164 // MS HTML Help
165 // ----------------------------------------------------------------------------
166
167 // instead of including htmlhelp.h, duplicate the things from it we need here:
168
169 enum
170 {
171 HH_DISPLAY_TOPIC,
172 HH_DISPLAY_TOC,
173 HH_DISPLAY_INDEX,
174 HH_DISPLAY_SEARCH,
175 HH_SET_WIN_TYPE,
176 HH_GET_WIN_TYPE,
177 HH_GET_WIN_HANDLE,
178 HH_ENUM_INFO_TYPE,
179 HH_SET_INFO_TYPE,
180 HH_SYNC,
181 HH_RESERVED1,
182 HH_RESERVED2,
183 HH_RESERVED3,
184 HH_KEYWORD_LOOKUP,
185 HH_DISPLAY_TEXT_POPUP,
186 HH_HELP_CONTEXT,
187 HH_TP_HELP_CONTEXTMENU,
188 HH_TP_HELP_WM_HELP,
189 HH_CLOSE_ALL,
190 HH_ALINK_LOOKUP,
191 HH_GET_LAST_ERROR,
192 HH_ENUM_CATEGORY,
193 HH_ENUM_CATEGORY_IT,
194 HH_RESET_IT_FILTER,
195 HH_SET_INCLUSIVE_FILTER,
196 HH_SET_EXCLUSIVE_FILTER
197 };
198
199 struct HH_POPUP
200 {
201 int cbStruct;
202 HINSTANCE hinst;
203 UINT idString;
204 LPCTSTR pszText;
205 POINT pt;
206 COLORREF clrForeground;
207 COLORREF clrBackground;
208 RECT rcMargins;
209 LPCTSTR pszFont;
210 };
211
212 struct HH_AKLINK
213 {
214 int cbStruct;
215 BOOL fReserved;
216 LPCTSTR pszKeywords;
217 LPCTSTR pszUrl;
218 LPCTSTR pszMsgText;
219 LPCTSTR pszMsgTitle;
220 LPCTSTR pszWindow;
221 BOOL fIndexOnFail;
222 };
223
224
225 // ----------------------------------------------------------------------------
226 // Misc stuff
227 // ----------------------------------------------------------------------------
228
229 #ifndef QS_ALLPOSTMESSAGE
230 #define QS_ALLPOSTMESSAGE 0x0100
231 #endif
232
233 #ifdef __WXWINE__
234 #define LV_ITEMA LVITEMA
235 #define LV_ITEMW LVITEMW
236 #define LV_DISPINFOA NMLVDISPINFOA
237 #define LV_DISPINFOW NMLVDISPINFOW
238
239 #if wxUSE_UNICODE
240 #define LV_FINDINFO LVFINDINFOW
241 #else
242 #define LV_FINDINFO LVFINDINFOA
243 #endif
244
245 #endif
246
247 #endif
248 // _WX_MISSING_H_