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 QS_ALLPOSTMESSAGE
481 #define QS_ALLPOSTMESSAGE 0x0100
484 #ifndef WS_EX_CLIENTEDGE
485 #define WS_EX_CLIENTEDGE 0x00000200L
488 #ifndef ENDSESSION_LOGOFF
489 #define ENDSESSION_LOGOFF 0x80000000
492 #ifndef HANGUL_CHARSET
493 #define HANGUL_CHARSET 129
505 #define TME_QUERY 0x40000000
509 #define TME_CANCEL 0x80000000
512 #ifndef HOVER_DEFAULT
513 #define HOVER_DEFAULT 0xFFFFFFFF
518 typedef struct tagTRACKMOUSEEVENT
{
523 } TRACKMOUSEEVENT
, *LPTRACKMOUSEEVENT
;
525 WINCOMMCTRLAPI BOOL WINAPI
_TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack
);
527 #define CCM_SETUNICODEFORMAT 8197
531 // This didn't appear in mingw until 2.95.2
533 #define SIF_TRACKPOS 16
537 #ifndef WM_MOUSEWHEEL
538 #define WM_MOUSEWHEEL 0x020A
541 #define WHEEL_DELTA 120
543 #ifndef SPI_GETWHEELSCROLLLINES
544 #define SPI_GETWHEELSCROLLLINES 104
546 #endif // wxUSE_MOUSEWHEEL
549 #define VK_OEM_1 0xBA
550 #define VK_OEM_2 0xBF
551 #define VK_OEM_3 0xC0
552 #define VK_OEM_4 0xDB
553 #define VK_OEM_5 0xDC
554 #define VK_OEM_6 0xDD
555 #define VK_OEM_7 0xDE
559 #define VK_OEM_PLUS 0xBB
560 #define VK_OEM_COMMA 0xBC
561 #define VK_OEM_MINUS 0xBD
562 #define VK_OEM_PERIOD 0xBE
565 #ifndef WM_UPDATEUISTATE
566 #define WM_UPDATEUISTATE 0x128
569 #ifndef UIS_INITIALIZE
570 #define UIS_INITIALIZE 3
573 #ifndef UISF_HIDEFOCUS
574 #define UISF_HIDEFOCUS 1
577 #ifndef UISF_HIDEACCEL
578 #define UISF_HIDEACCEL 2
581 #ifndef WC_NO_BEST_FIT_CHARS
582 #define WC_NO_BEST_FIT_CHARS 0x400
585 // In addition, include stuff not defined in WinCE
587 #include "wx/msw/wince/missing.h"