]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/missing.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/missing.h
3 // Purpose: Declarations for parts of the Win32 SDK that are missing in
4 // the versions that come with some compilers
7 // Copyright: (c) 2002 Mattia Barbon
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MISSING_H_
12 #define _WX_MISSING_H_
14 // ----------------------------------------------------------------------------
15 // ListView common control
16 // ----------------------------------------------------------------------------
20 (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON)
23 #ifndef LVM_SETEXTENDEDLISTVIEWSTYLE
24 #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54)
27 #ifndef LVS_EX_FULLROWSELECT
28 #define LVS_EX_FULLROWSELECT 0x00000020
32 #define LVS_OWNERDATA 0x1000
36 #define LVM_FIRST 0x1000
40 #define HDM_FIRST 0x1200
43 #ifndef LVCFMT_JUSTIFYMASK
44 #define LVCFMT_JUSTIFYMASK 0x0003
47 #ifndef LVSICF_NOSCROLL
48 #define LVSICF_NOSCROLL 0x0002
51 // mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff
53 typedef struct tagNMLVCACHEHINT
60 #define NM_CACHEHINT NMLVCACHEHINT
63 #ifndef LVN_ODCACHEHINT
64 #define LVN_ODCACHEHINT (-113)
67 #ifndef ListView_GetHeader
68 #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0)
72 #define LVM_GETHEADER (LVM_FIRST+31)
75 #ifndef Header_GetItemRect
76 #define Header_GetItemRect(w,i,r) \
77 (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
80 #ifndef HDM_GETITEMRECT
81 #define HDM_GETITEMRECT (HDM_FIRST+7)
85 #define LVCF_IMAGE 0x0010
88 #ifndef LVCFMT_BITMAP_ON_RIGHT
89 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
92 #if defined(__GNUWIN32__) && !defined(LV_ITEM) \
93 && !wxCHECK_W32API_VERSION( 0, 5 )
94 typedef struct _LVITEMW
{
104 #if (_WIN32_IE >= 0x0300)
109 typedef struct tagLVITEMA
120 #if (_WIN32_IE >= 0x0300)
125 #define LV_ITEM LV_ITEMA;
128 #ifndef ListView_GetColumnWidth
129 #define ListView_GetColumnWidth(hwnd, iCol) \
130 (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
133 #ifndef ListView_SetColumnWidth
134 #define ListView_SetColumnWidth(hwnd, iCol, cx) \
135 (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
138 #ifndef ListView_GetTextColor
139 #define ListView_GetTextColor(hwnd) \
140 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
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))
148 #if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
150 typedef struct tagNMLVDISPINFOA
{
153 } NMLVDISPINFOA
, FAR
*LPNMLVDISPINFOA
;
154 #define _LV_DISPINFOA tagNMLVDISPINFOA
155 #define LV_DISPINFOA NMLVDISPINFOA
158 typedef struct tagNMLVDISPINFOW
{
161 } NMLVDISPINFOW
, FAR
*LPNMLVDISPINFOW
;
162 #define _LV_DISPINFOW tagNMLVDISPINFOW
163 #define LV_DISPINFOW NMLVDISPINFOW
167 #if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined (__MINGW32__) || defined(__DIGITALMARS__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
168 #define HDN_GETDISPINFOW (HDN_FIRST-29)
169 #if !wxCHECK_W32API_VERSION(2, 2)
178 } NMHDDISPINFOW
, *LPNMHDDISPINFOW
;
183 // ----------------------------------------------------------------------------
185 // ----------------------------------------------------------------------------
187 // instead of including htmlhelp.h, duplicate the things from it we need here:
205 HH_DISPLAY_TEXT_POPUP
,
207 HH_TP_HELP_CONTEXTMENU
,
215 HH_SET_INCLUSIVE_FILTER
,
216 HH_SET_EXCLUSIVE_FILTER
226 COLORREF clrForeground
;
227 COLORREF clrBackground
;
244 // ----------------------------------------------------------------------------
245 // SHGetFileInfo-related things
246 // ----------------------------------------------------------------------------
248 #ifndef SHGetFileInfo
250 #define SHGetFileInfo SHGetFileInfoW
252 #define SHGetFileInfo SHGetFileInfoA
256 #ifndef SHGFI_ATTRIBUTES
257 #define SHGFI_ATTRIBUTES 2048
260 #ifndef SFGAO_READONLY
261 #define SFGAO_READONLY 0x00040000L
264 #ifndef SFGAO_REMOVABLE
265 #define SFGAO_REMOVABLE 0x02000000L
268 #ifndef SHGFI_DISPLAYNAME
269 #define SHGFI_DISPLAYNAME 512
273 #define SHGFI_ICON 256
276 #ifndef SHGFI_SMALLICON
277 #define SHGFI_SMALLICON 1
280 #ifndef SHGFI_SHELLICONSIZE
281 #define SHGFI_SHELLICONSIZE 4
284 #ifndef SHGFI_OPENICON
285 #define SHGFI_OPENICON 2
288 // ----------------------------------------------------------------------------
290 // ----------------------------------------------------------------------------
292 #if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
294 // old mingw32 doesn't define this
296 #define CFM_CHARSET 0x08000000
297 #endif // CFM_CHARSET
299 #ifndef CFM_BACKCOLOR
300 #define CFM_BACKCOLOR 0x04000000
303 // cygwin does not have these defined for richedit
305 #define ENM_LINK 0x04000000
308 #ifndef EM_AUTOURLDETECT
309 #define EM_AUTOURLDETECT (WM_USER + 91)
313 #define EN_LINK 0x070b
315 typedef struct _enlink
326 #define SF_UNICODE 0x0010
329 // Watcom C++ doesn't define this
331 #define SCF_ALL 0x0004
335 #define PFA_JUSTIFY 4
337 typedef struct _paraformat2
{
347 LONG rgxTabs
[MAX_TAB_STOPS
];
352 BYTE bLineSpacingRule
;
356 WORD wNumberingStart
;
357 WORD wNumberingStyle
;
363 #define wxEffects wReserved
367 #endif // wxUSE_RICHEDIT
369 // ----------------------------------------------------------------------------
371 // ----------------------------------------------------------------------------
375 #if !defined(TBIF_SIZE)
378 #define TB_SETBUTTONINFO (WM_USER+66)
391 } TBBUTTONINFO
, *LPTBBUTTONINFO
;
393 #endif // !defined(TBIF_SIZE)
395 #endif // wxUSE_TOOLBAR
397 // ----------------------------------------------------------------------------
399 // ----------------------------------------------------------------------------
402 #define TVIS_FOCUSED 0x0001
406 #define TV_FIRST 0x1100
409 #ifndef TVS_CHECKBOXES
410 #define TVS_CHECKBOXES 0x0100
413 #ifndef TVS_FULLROWSELECT
414 #define TVS_FULLROWSELECT 0x1000
417 #ifndef TVM_SETBKCOLOR
418 #define TVM_SETBKCOLOR (TV_FIRST + 29)
419 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
422 // ----------------------------------------------------------------------------
424 // ----------------------------------------------------------------------------
426 #ifndef QS_ALLPOSTMESSAGE
427 #define QS_ALLPOSTMESSAGE 0x0100
430 #ifndef WS_EX_CLIENTEDGE
431 #define WS_EX_CLIENTEDGE 0x00000200L
434 #ifndef ENDSESSION_LOGOFF
435 #define ENDSESSION_LOGOFF 0x80000000
438 #ifndef HANGUL_CHARSET
439 #define HANGUL_CHARSET 129