]>
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_NOINVALIDATEALL 0x0001
49 #define LVSICF_NOSCROLL 0x0002
52 // mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff
54 typedef struct tagNMLVCACHEHINT
61 #define NM_CACHEHINT NMLVCACHEHINT
64 #ifndef LVN_ODCACHEHINT
65 #define LVN_ODCACHEHINT (-113)
68 #ifndef ListView_GetHeader
69 #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0)
73 #define LVM_GETHEADER (LVM_FIRST+31)
76 #ifndef Header_GetItemRect
77 #define Header_GetItemRect(w,i,r) \
78 (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
81 #ifndef HDM_GETITEMRECT
82 #define HDM_GETITEMRECT (HDM_FIRST+7)
86 #define LVCF_IMAGE 0x0010
89 #ifndef LVCFMT_BITMAP_ON_RIGHT
90 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
93 #if defined(__GNUWIN32__) && !defined(LV_ITEM) \
94 && !wxCHECK_W32API_VERSION( 0, 5 )
95 typedef struct _LVITEMW
{
105 #if (_WIN32_IE >= 0x0300)
110 typedef struct tagLVITEMA
121 #if (_WIN32_IE >= 0x0300)
126 #define LV_ITEM LV_ITEMA;
129 #ifndef ListView_GetColumnWidth
130 #define ListView_GetColumnWidth(hwnd, iCol) \
131 (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
134 #ifndef ListView_SetColumnWidth
135 #define ListView_SetColumnWidth(hwnd, iCol, cx) \
136 (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
139 #ifndef ListView_GetTextColor
140 #define ListView_GetTextColor(hwnd) \
141 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
144 #ifndef ListView_FindItem
145 #define ListView_FindItem(hwnd, iStart, plvfi) \
146 (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO FAR*)(plvfi))
149 #if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
151 typedef struct tagNMLVDISPINFOA
{
154 } NMLVDISPINFOA
, FAR
*LPNMLVDISPINFOA
;
155 #define _LV_DISPINFOA tagNMLVDISPINFOA
156 #define LV_DISPINFOA NMLVDISPINFOA
159 typedef struct tagNMLVDISPINFOW
{
162 } NMLVDISPINFOW
, FAR
*LPNMLVDISPINFOW
;
163 #define _LV_DISPINFOW tagNMLVDISPINFOW
164 #define LV_DISPINFOW NMLVDISPINFOW
168 #if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined (__MINGW32__) || defined(__DIGITALMARS__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
169 #define HDN_GETDISPINFOW (HDN_FIRST-29)
170 #if !wxCHECK_W32API_VERSION(2, 2)
179 } NMHDDISPINFOW
, *LPNMHDDISPINFOW
;
183 #ifndef LVM_SETUNICODEFORMAT
184 #define LVM_SETUNICODEFORMAT 0x2005
188 // ----------------------------------------------------------------------------
189 // Toolbar define value missing
190 // ----------------------------------------------------------------------------
191 #if !defined(CCS_VERT)
192 #define CCS_VERT 0x00000080L
195 // ----------------------------------------------------------------------------
197 // ----------------------------------------------------------------------------
199 // instead of including htmlhelp.h, duplicate the things from it we need here:
217 HH_DISPLAY_TEXT_POPUP
,
219 HH_TP_HELP_CONTEXTMENU
,
227 HH_SET_INCLUSIVE_FILTER
,
228 HH_SET_EXCLUSIVE_FILTER
238 COLORREF clrForeground
;
239 COLORREF clrBackground
;
256 // ----------------------------------------------------------------------------
257 // SHGetFileInfo-related things
258 // ----------------------------------------------------------------------------
260 #ifndef SHGetFileInfo
262 #define SHGetFileInfo SHGetFileInfoW
264 #define SHGetFileInfo SHGetFileInfoA
268 #ifndef SHGFI_ATTRIBUTES
269 #define SHGFI_ATTRIBUTES 2048
272 #ifndef SFGAO_READONLY
273 #define SFGAO_READONLY 0x00040000L
276 #ifndef SFGAO_REMOVABLE
277 #define SFGAO_REMOVABLE 0x02000000L
280 #ifndef SHGFI_DISPLAYNAME
281 #define SHGFI_DISPLAYNAME 512
285 #define SHGFI_ICON 256
288 #ifndef SHGFI_SMALLICON
289 #define SHGFI_SMALLICON 1
292 #ifndef SHGFI_SHELLICONSIZE
293 #define SHGFI_SHELLICONSIZE 4
296 #ifndef SHGFI_OPENICON
297 #define SHGFI_OPENICON 2
300 // ----------------------------------------------------------------------------
302 // ----------------------------------------------------------------------------
304 #if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
306 // old mingw32 doesn't define this
308 #define CFM_CHARSET 0x08000000
309 #endif // CFM_CHARSET
311 #ifndef CFM_BACKCOLOR
312 #define CFM_BACKCOLOR 0x04000000
315 // cygwin does not have these defined for richedit
317 #define ENM_LINK 0x04000000
320 #ifndef EM_AUTOURLDETECT
321 #define EM_AUTOURLDETECT (WM_USER + 91)
325 #define EN_LINK 0x070b
327 typedef struct _enlink
338 #define SF_UNICODE 0x0010
341 // Watcom C++ doesn't define this
343 #define SCF_ALL 0x0004
347 #define PFA_JUSTIFY 4
349 typedef struct _paraformat2
{
359 LONG rgxTabs
[MAX_TAB_STOPS
];
364 BYTE bLineSpacingRule
;
368 WORD wNumberingStart
;
369 WORD wNumberingStyle
;
375 #define wxEffects wReserved
379 #endif // wxUSE_RICHEDIT
381 // ----------------------------------------------------------------------------
383 // ----------------------------------------------------------------------------
387 #if !defined(TBIF_SIZE)
390 #define TB_SETBUTTONINFO (WM_USER+66)
403 } TBBUTTONINFO
, *LPTBBUTTONINFO
;
405 #endif // !defined(TBIF_SIZE)
407 #endif // wxUSE_TOOLBAR
409 // ----------------------------------------------------------------------------
411 // ----------------------------------------------------------------------------
414 #define TVIS_FOCUSED 0x0001
418 #define TV_FIRST 0x1100
421 #ifndef TVS_CHECKBOXES
422 #define TVS_CHECKBOXES 0x0100
425 #ifndef TVS_FULLROWSELECT
426 #define TVS_FULLROWSELECT 0x1000
429 #ifndef TVM_SETBKCOLOR
430 #define TVM_SETBKCOLOR (TV_FIRST + 29)
431 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
435 #define TVS_INFOTIP 2048
438 #ifndef TVN_GETINFOTIPA
439 #define TVN_GETINFOTIPA (TVN_FIRST-13)
440 #define TVN_GETINFOTIPW (TVN_FIRST-14)
443 #ifndef TVN_GETINFOTIP
445 #define TVN_GETINFOTIP TVN_GETINFOTIPW
447 #define TVN_GETINFOTIP TVN_GETINFOTIPA
451 #if !defined(NMTVGETINFOTIP) && defined(TVN_FIRST)
452 // NB: Check for TVN_FIRST is done so that this code is not included if
453 // <commctrl.h> (which defined HTREEITEM) wasn't included before.
454 struct NMTVGETINFOTIPA
462 struct NMTVGETINFOTIPW
471 #define NMTVGETINFOTIP NMTVGETINFOTIPW
473 #define NMTVGETINFOTIP NMTVGETINFOTIPA
477 // ----------------------------------------------------------------------------
479 // ----------------------------------------------------------------------------
481 #ifndef CCM_SETUNICODEFORMAT
482 #define CCM_SETUNICODEFORMAT 8197
485 #ifndef QS_ALLPOSTMESSAGE
486 #define QS_ALLPOSTMESSAGE 0x0100
489 #ifndef WS_EX_CLIENTEDGE
490 #define WS_EX_CLIENTEDGE 0x00000200L
493 #ifndef ENDSESSION_LOGOFF
494 #define ENDSESSION_LOGOFF 0x80000000
497 #ifndef HANGUL_CHARSET
498 #define HANGUL_CHARSET 129
510 #define TME_QUERY 0x40000000
514 #define TME_CANCEL 0x80000000
517 #ifndef HOVER_DEFAULT
518 #define HOVER_DEFAULT 0xFFFFFFFF
523 #ifndef _TrackMouseEvent
524 #define _TrackMouseEvent TrackMouseEvent
529 // This didn't appear in mingw until 2.95.2
531 #define SIF_TRACKPOS 16
535 #ifndef WM_MOUSEWHEEL
536 #define WM_MOUSEWHEEL 0x020A
539 #define WHEEL_DELTA 120
541 #ifndef SPI_GETWHEELSCROLLLINES
542 #define SPI_GETWHEELSCROLLLINES 104
544 #endif // wxUSE_MOUSEWHEEL
547 #define VK_OEM_1 0xBA
548 #define VK_OEM_2 0xBF
549 #define VK_OEM_3 0xC0
550 #define VK_OEM_4 0xDB
551 #define VK_OEM_5 0xDC
552 #define VK_OEM_6 0xDD
553 #define VK_OEM_7 0xDE
557 #define VK_OEM_PLUS 0xBB
558 #define VK_OEM_COMMA 0xBC
559 #define VK_OEM_MINUS 0xBD
560 #define VK_OEM_PERIOD 0xBE
563 #ifndef WM_UPDATEUISTATE
564 #define WM_UPDATEUISTATE 0x128
567 #ifndef UIS_INITIALIZE
568 #define UIS_INITIALIZE 3
571 #ifndef UISF_HIDEFOCUS
572 #define UISF_HIDEFOCUS 1
575 #ifndef UISF_HIDEACCEL
576 #define UISF_HIDEACCEL 2
579 #ifndef WC_NO_BEST_FIT_CHARS
580 #define WC_NO_BEST_FIT_CHARS 0x400
584 #define OFN_EXPLORER 0x00080000
587 #ifndef OFN_ENABLESIZING
588 #define OFN_ENABLESIZING 0x00800000
591 // ------------------ For Flashing Window -------------
592 #if (defined(__BORLANDC__) && (__BORLANDC__ < 550))
599 } FLASHWINFO
, *PFLASHWINFO
;
602 // In addition, include stuff not defined in WinCE
604 #include "wx/msw/wince/missing.h"