]>
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
;
182 #ifndef LVM_SETUNICODEFORMAT
183 #define LVM_SETUNICODEFORMAT 0x2005
186 // ----------------------------------------------------------------------------
187 // Toolbar define value missing
188 // ----------------------------------------------------------------------------
189 #if !defined(CCS_VERT)
190 #define CCS_VERT 0x00000080L
193 // ----------------------------------------------------------------------------
195 // ----------------------------------------------------------------------------
197 // instead of including htmlhelp.h, duplicate the things from it we need here:
215 HH_DISPLAY_TEXT_POPUP
,
217 HH_TP_HELP_CONTEXTMENU
,
225 HH_SET_INCLUSIVE_FILTER
,
226 HH_SET_EXCLUSIVE_FILTER
236 COLORREF clrForeground
;
237 COLORREF clrBackground
;
254 // ----------------------------------------------------------------------------
255 // SHGetFileInfo-related things
256 // ----------------------------------------------------------------------------
258 #ifndef SHGetFileInfo
260 #define SHGetFileInfo SHGetFileInfoW
262 #define SHGetFileInfo SHGetFileInfoA
266 #ifndef SHGFI_ATTRIBUTES
267 #define SHGFI_ATTRIBUTES 2048
270 #ifndef SFGAO_READONLY
271 #define SFGAO_READONLY 0x00040000L
274 #ifndef SFGAO_REMOVABLE
275 #define SFGAO_REMOVABLE 0x02000000L
278 #ifndef SHGFI_DISPLAYNAME
279 #define SHGFI_DISPLAYNAME 512
283 #define SHGFI_ICON 256
286 #ifndef SHGFI_SMALLICON
287 #define SHGFI_SMALLICON 1
290 #ifndef SHGFI_SHELLICONSIZE
291 #define SHGFI_SHELLICONSIZE 4
294 #ifndef SHGFI_OPENICON
295 #define SHGFI_OPENICON 2
298 // ----------------------------------------------------------------------------
300 // ----------------------------------------------------------------------------
302 #if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
304 // old mingw32 doesn't define this
306 #define CFM_CHARSET 0x08000000
307 #endif // CFM_CHARSET
309 #ifndef CFM_BACKCOLOR
310 #define CFM_BACKCOLOR 0x04000000
313 // cygwin does not have these defined for richedit
315 #define ENM_LINK 0x04000000
318 #ifndef EM_AUTOURLDETECT
319 #define EM_AUTOURLDETECT (WM_USER + 91)
323 #define EN_LINK 0x070b
325 typedef struct _enlink
336 #define SF_UNICODE 0x0010
339 // Watcom C++ doesn't define this
341 #define SCF_ALL 0x0004
345 #define PFA_JUSTIFY 4
347 typedef struct _paraformat2
{
357 LONG rgxTabs
[MAX_TAB_STOPS
];
362 BYTE bLineSpacingRule
;
366 WORD wNumberingStart
;
367 WORD wNumberingStyle
;
373 #define wxEffects wReserved
377 #endif // wxUSE_RICHEDIT
379 // ----------------------------------------------------------------------------
381 // ----------------------------------------------------------------------------
385 #if !defined(TBIF_SIZE)
388 #define TB_SETBUTTONINFO (WM_USER+66)
401 } TBBUTTONINFO
, *LPTBBUTTONINFO
;
403 #endif // !defined(TBIF_SIZE)
405 #endif // wxUSE_TOOLBAR
407 // ----------------------------------------------------------------------------
409 // ----------------------------------------------------------------------------
412 #define TVIS_FOCUSED 0x0001
416 #define TV_FIRST 0x1100
419 #ifndef TVS_CHECKBOXES
420 #define TVS_CHECKBOXES 0x0100
423 #ifndef TVS_FULLROWSELECT
424 #define TVS_FULLROWSELECT 0x1000
427 #ifndef TVM_SETBKCOLOR
428 #define TVM_SETBKCOLOR (TV_FIRST + 29)
429 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
432 // ----------------------------------------------------------------------------
434 // ----------------------------------------------------------------------------
436 #ifndef QS_ALLPOSTMESSAGE
437 #define QS_ALLPOSTMESSAGE 0x0100
440 #ifndef WS_EX_CLIENTEDGE
441 #define WS_EX_CLIENTEDGE 0x00000200L
444 #ifndef ENDSESSION_LOGOFF
445 #define ENDSESSION_LOGOFF 0x80000000
448 #ifndef HANGUL_CHARSET
449 #define HANGUL_CHARSET 129