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
187 // ----------------------------------------------------------------------------
188 // Toolbar define value missing
189 // ----------------------------------------------------------------------------
190 #if !defined(CCS_VERT)
191 #define CCS_VERT 0x00000080L
194 // ----------------------------------------------------------------------------
196 // ----------------------------------------------------------------------------
198 // instead of including htmlhelp.h, duplicate the things from it we need here:
216 HH_DISPLAY_TEXT_POPUP
,
218 HH_TP_HELP_CONTEXTMENU
,
226 HH_SET_INCLUSIVE_FILTER
,
227 HH_SET_EXCLUSIVE_FILTER
237 COLORREF clrForeground
;
238 COLORREF clrBackground
;
255 // ----------------------------------------------------------------------------
256 // SHGetFileInfo-related things
257 // ----------------------------------------------------------------------------
259 #ifndef SHGetFileInfo
261 #define SHGetFileInfo SHGetFileInfoW
263 #define SHGetFileInfo SHGetFileInfoA
267 #ifndef SHGFI_ATTRIBUTES
268 #define SHGFI_ATTRIBUTES 2048
271 #ifndef SFGAO_READONLY
272 #define SFGAO_READONLY 0x00040000L
275 #ifndef SFGAO_REMOVABLE
276 #define SFGAO_REMOVABLE 0x02000000L
279 #ifndef SHGFI_DISPLAYNAME
280 #define SHGFI_DISPLAYNAME 512
284 #define SHGFI_ICON 256
287 #ifndef SHGFI_SMALLICON
288 #define SHGFI_SMALLICON 1
291 #ifndef SHGFI_SHELLICONSIZE
292 #define SHGFI_SHELLICONSIZE 4
295 #ifndef SHGFI_OPENICON
296 #define SHGFI_OPENICON 2
299 // ----------------------------------------------------------------------------
301 // ----------------------------------------------------------------------------
303 #if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
305 // old mingw32 doesn't define this
307 #define CFM_CHARSET 0x08000000
308 #endif // CFM_CHARSET
310 #ifndef CFM_BACKCOLOR
311 #define CFM_BACKCOLOR 0x04000000
314 // cygwin does not have these defined for richedit
316 #define ENM_LINK 0x04000000
319 #ifndef EM_AUTOURLDETECT
320 #define EM_AUTOURLDETECT (WM_USER + 91)
324 #define EN_LINK 0x070b
326 typedef struct _enlink
337 #define SF_UNICODE 0x0010
340 // Watcom C++ doesn't define this
342 #define SCF_ALL 0x0004
346 #define PFA_JUSTIFY 4
348 typedef struct _paraformat2
{
358 LONG rgxTabs
[MAX_TAB_STOPS
];
363 BYTE bLineSpacingRule
;
367 WORD wNumberingStart
;
368 WORD wNumberingStyle
;
374 #define wxEffects wReserved
378 #endif // wxUSE_RICHEDIT
380 // ----------------------------------------------------------------------------
382 // ----------------------------------------------------------------------------
386 #if !defined(TBIF_SIZE)
389 #define TB_SETBUTTONINFO (WM_USER+66)
402 } TBBUTTONINFO
, *LPTBBUTTONINFO
;
404 #endif // !defined(TBIF_SIZE)
406 #endif // wxUSE_TOOLBAR
408 // ----------------------------------------------------------------------------
410 // ----------------------------------------------------------------------------
413 #define TVIS_FOCUSED 0x0001
417 #define TV_FIRST 0x1100
420 #ifndef TVS_CHECKBOXES
421 #define TVS_CHECKBOXES 0x0100
424 #ifndef TVS_FULLROWSELECT
425 #define TVS_FULLROWSELECT 0x1000
428 #ifndef TVM_SETBKCOLOR
429 #define TVM_SETBKCOLOR (TV_FIRST + 29)
430 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
434 #define TVS_INFOTIP 2048
437 #ifndef TVN_GETINFOTIPA
438 #define TVN_GETINFOTIPA (TVN_FIRST-13)
439 #define TVN_GETINFOTIPW (TVN_FIRST-14)
442 #ifndef TVN_GETINFOTIP
444 #define TVN_GETINFOTIP TVN_GETINFOTIPW
446 #define TVN_GETINFOTIP TVN_GETINFOTIPA
450 #if !defined(NMTVGETINFOTIP) && defined(TVN_FIRST)
451 // NB: Check for TVN_FIRST is done so that this code is not included if
452 // <commctrl.h> (which defined HTREEITEM) wasn't included before.
453 struct NMTVGETINFOTIPA
461 struct NMTVGETINFOTIPW
470 #define NMTVGETINFOTIP NMTVGETINFOTIPW
472 #define NMTVGETINFOTIP NMTVGETINFOTIPA
476 // ----------------------------------------------------------------------------
478 // ----------------------------------------------------------------------------
480 #ifndef CCM_SETUNICODEFORMAT
481 #define CCM_SETUNICODEFORMAT 8197
484 #ifndef QS_ALLPOSTMESSAGE
485 #define QS_ALLPOSTMESSAGE 0x0100
488 #ifndef WS_EX_CLIENTEDGE
489 #define WS_EX_CLIENTEDGE 0x00000200L
492 #ifndef ENDSESSION_LOGOFF
493 #define ENDSESSION_LOGOFF 0x80000000
496 #ifndef HANGUL_CHARSET
497 #define HANGUL_CHARSET 129
509 #define TME_QUERY 0x40000000
513 #define TME_CANCEL 0x80000000
516 #ifndef HOVER_DEFAULT
517 #define HOVER_DEFAULT 0xFFFFFFFF
522 typedef struct tagTRACKMOUSEEVENT
{
527 } TRACKMOUSEEVENT
, *LPTRACKMOUSEEVENT
;
529 WINCOMMCTRLAPI BOOL WINAPI
_TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack
);
533 // This didn't appear in mingw until 2.95.2
535 #define SIF_TRACKPOS 16
539 #ifndef WM_MOUSEWHEEL
540 #define WM_MOUSEWHEEL 0x020A
543 #define WHEEL_DELTA 120
545 #ifndef SPI_GETWHEELSCROLLLINES
546 #define SPI_GETWHEELSCROLLLINES 104
548 #endif // wxUSE_MOUSEWHEEL
551 #define VK_OEM_1 0xBA
552 #define VK_OEM_2 0xBF
553 #define VK_OEM_3 0xC0
554 #define VK_OEM_4 0xDB
555 #define VK_OEM_5 0xDC
556 #define VK_OEM_6 0xDD
557 #define VK_OEM_7 0xDE
561 #define VK_OEM_PLUS 0xBB
562 #define VK_OEM_COMMA 0xBC
563 #define VK_OEM_MINUS 0xBD
564 #define VK_OEM_PERIOD 0xBE
567 #ifndef WM_UPDATEUISTATE
568 #define WM_UPDATEUISTATE 0x128
571 #ifndef UIS_INITIALIZE
572 #define UIS_INITIALIZE 3
575 #ifndef UISF_HIDEFOCUS
576 #define UISF_HIDEFOCUS 1
579 #ifndef UISF_HIDEACCEL
580 #define UISF_HIDEACCEL 2
583 #ifndef WC_NO_BEST_FIT_CHARS
584 #define WC_NO_BEST_FIT_CHARS 0x400
588 #define OFN_EXPLORER 0x00080000
591 #ifndef OFN_ENABLESIZING
592 #define OFN_ENABLESIZING 0x00800000
595 // In addition, include stuff not defined in WinCE
597 #include "wx/msw/wince/missing.h"