]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/missing.h
Small speed up to fonts and support for scaling.
[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 #if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__)) && !defined(HDN_GETDISPINFOW)
163 #define HDN_GETDISPINFOW (HDN_FIRST-29)
164 typedef struct {
165 NMHDR hdr;
166 int iItem;
167 UINT mask;
168 LPWSTR pszText;
169 int cchTextMax;
170 int iImage;
171 LPARAM lParam;
172 } NMHDDISPINFOW, *LPNMHDDISPINFOW;
173 #endif
174
175
176 // ----------------------------------------------------------------------------
177 // MS HTML Help
178 // ----------------------------------------------------------------------------
179
180 // instead of including htmlhelp.h, duplicate the things from it we need here:
181
182 enum
183 {
184 HH_DISPLAY_TOPIC,
185 HH_DISPLAY_TOC,
186 HH_DISPLAY_INDEX,
187 HH_DISPLAY_SEARCH,
188 HH_SET_WIN_TYPE,
189 HH_GET_WIN_TYPE,
190 HH_GET_WIN_HANDLE,
191 HH_ENUM_INFO_TYPE,
192 HH_SET_INFO_TYPE,
193 HH_SYNC,
194 HH_RESERVED1,
195 HH_RESERVED2,
196 HH_RESERVED3,
197 HH_KEYWORD_LOOKUP,
198 HH_DISPLAY_TEXT_POPUP,
199 HH_HELP_CONTEXT,
200 HH_TP_HELP_CONTEXTMENU,
201 HH_TP_HELP_WM_HELP,
202 HH_CLOSE_ALL,
203 HH_ALINK_LOOKUP,
204 HH_GET_LAST_ERROR,
205 HH_ENUM_CATEGORY,
206 HH_ENUM_CATEGORY_IT,
207 HH_RESET_IT_FILTER,
208 HH_SET_INCLUSIVE_FILTER,
209 HH_SET_EXCLUSIVE_FILTER
210 };
211
212 struct HH_POPUP
213 {
214 int cbStruct;
215 HINSTANCE hinst;
216 UINT idString;
217 LPCTSTR pszText;
218 POINT pt;
219 COLORREF clrForeground;
220 COLORREF clrBackground;
221 RECT rcMargins;
222 LPCTSTR pszFont;
223 };
224
225 struct HH_AKLINK
226 {
227 int cbStruct;
228 BOOL fReserved;
229 LPCTSTR pszKeywords;
230 LPCTSTR pszUrl;
231 LPCTSTR pszMsgText;
232 LPCTSTR pszMsgTitle;
233 LPCTSTR pszWindow;
234 BOOL fIndexOnFail;
235 };
236
237
238 // ----------------------------------------------------------------------------
239 // Misc stuff
240 // ----------------------------------------------------------------------------
241
242 #ifndef QS_ALLPOSTMESSAGE
243 #define QS_ALLPOSTMESSAGE 0x0100
244 #endif
245
246 #endif
247 // _WX_MISSING_H_