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 // Common Control missing
189 // ----------------------------------------------------------------------------
190 // __DMC__ date time control IDs
193 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
194 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
196 #define ICC_DATE_CLASSES 256
198 #if (_WIN32_IE >= 0x0300)
199 typedef struct tagINITCOMMONCONTROLSEX
{
202 } INITCOMMONCONTROLSEX
,*LPINITCOMMONCONTROLSEX
;
213 #define DTS_SHOWNONE 2
214 #define DTS_SHORTDATEFORMAT 0
215 #define DTS_LONGDATEFORMAT 4
216 #define DTS_TIMEFORMAT 9
217 #define DTS_APPCANPARSE 16
218 #define DTS_RIGHTALIGN 32
219 #if ( _WIN32_IE >= 0x500 )
220 #define DTS_SHORTDATECENTURYFORMAT 0x000C
221 #endif /* _WIN32_IE >= 0x500 */
226 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
227 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
230 #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
232 #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
235 #define DTM_GETSYSTEMTIME 0x1001
236 #define DTM_SETSYSTEMTIME 0x1002
237 #define DTM_GETRANGE 0x1003
238 #define DTM_SETRANGE 0x1004
239 #define DTN_DATETIMECHANGE ((UINT)-759)
241 #define DateTime_GetMonthCal(hwnd) SNDMSG(hwnd, DTM_GETMONTHCAL, 0, 0)
242 #define DateTime_GetMonthCalColor(hwnd, icolor) SNDMSG(hwnd, DTM_GETMONTHCAL, (WPARAM)icolor,0)
243 #define DateTime_GetMonthCalFont(hwnd) SNDMSG(hwnd,DTM_GETMCFONT,0,0)
244 #define DateTime_GetRange(hwnd,lpsystimearray) SNDMSG(hwnd,DTM_GETRANGE,0,(LPARAM)lpsystimearray)
245 #define DateTime_GetSystemTime(hwnd,lpsystime) SNDMSG(hwnd,DTM_GETSYSTEMTIME,0,(LPARAM)lpsystime)
246 #define DateTime_SetFormat(hwnd,lpszformat) SNDMSG(hwnd,DTM_SETFORMAT,0,(LPARAM)lpszformat)
247 #define DateTime_SetMonthCalColor(hwnd,icolor,clr) SNDMSG(hwnd,DTM_SETMCCOLOR,(WPARAM)icolor,(LPARAM)clr)
248 #define DateTime_SetMonthCalFont(hwnd,hfont,lparam) SNDMSG(hwnd,DTM_SETMCFONT,(WPARAM)hfont,(LPARAM)lparam)
249 #define DateTime_SetRange(hwnd,flags,lpsystimearray) SNDMSG(hwnd,DTM_SETRANGE,(WPARAM)flags,(LPARAM)lpsystimearray)
250 #define DateTime_SetSystemTime(hwnd,flag,lpsystime) SNDMSG(hwnd,DTM_SETSYSTEMTIME,(WPARAM)flag,(LPARAM)lpsystime)
253 #endif //__DMC__ date time control IDs
255 #if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 2, 4 ) || defined (__DMC__)
256 typedef struct tagNMDATETIMECHANGE
262 #endif // old gcc headers
264 // ----------------------------------------------------------------------------
265 // Toolbar define value missing
266 // ----------------------------------------------------------------------------
267 #if !defined(CCS_VERT)
268 #define CCS_VERT 0x00000080L
271 // ----------------------------------------------------------------------------
273 // ----------------------------------------------------------------------------
275 // instead of including htmlhelp.h, duplicate the things from it we need here:
293 HH_DISPLAY_TEXT_POPUP
,
295 HH_TP_HELP_CONTEXTMENU
,
303 HH_SET_INCLUSIVE_FILTER
,
304 HH_SET_EXCLUSIVE_FILTER
314 COLORREF clrForeground
;
315 COLORREF clrBackground
;
332 // ----------------------------------------------------------------------------
333 // SHGetFileInfo-related things
334 // ----------------------------------------------------------------------------
336 #ifndef SHGetFileInfo
338 #define SHGetFileInfo SHGetFileInfoW
340 #define SHGetFileInfo SHGetFileInfoA
344 #ifndef SHGFI_ATTRIBUTES
345 #define SHGFI_ATTRIBUTES 2048
348 #ifndef SFGAO_READONLY
349 #define SFGAO_READONLY 0x00040000L
352 #ifndef SFGAO_REMOVABLE
353 #define SFGAO_REMOVABLE 0x02000000L
356 #ifndef SHGFI_DISPLAYNAME
357 #define SHGFI_DISPLAYNAME 512
361 #define SHGFI_ICON 256
364 #ifndef SHGFI_SMALLICON
365 #define SHGFI_SMALLICON 1
368 #ifndef SHGFI_SHELLICONSIZE
369 #define SHGFI_SHELLICONSIZE 4
372 #ifndef SHGFI_OPENICON
373 #define SHGFI_OPENICON 2
376 // ----------------------------------------------------------------------------
378 // ----------------------------------------------------------------------------
380 #if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
382 // old mingw32 doesn't define this
384 #define CFM_CHARSET 0x08000000
385 #endif // CFM_CHARSET
387 #ifndef CFM_BACKCOLOR
388 #define CFM_BACKCOLOR 0x04000000
391 // cygwin does not have these defined for richedit
393 #define ENM_LINK 0x04000000
396 #ifndef EM_AUTOURLDETECT
397 #define EM_AUTOURLDETECT (WM_USER + 91)
401 #define EN_LINK 0x070b
403 typedef struct _enlink
414 #define SF_UNICODE 0x0010
417 // Watcom C++ doesn't define this
419 #define SCF_ALL 0x0004
423 #define PFA_JUSTIFY 4
425 typedef struct _paraformat2
{
435 LONG rgxTabs
[MAX_TAB_STOPS
];
440 BYTE bLineSpacingRule
;
444 WORD wNumberingStart
;
445 WORD wNumberingStyle
;
451 #define wxEffects wReserved
455 #endif // wxUSE_RICHEDIT
457 // ----------------------------------------------------------------------------
459 // ----------------------------------------------------------------------------
463 #if !defined(TBIF_SIZE)
466 #define TB_SETBUTTONINFO (WM_USER+66)
479 } TBBUTTONINFO
, *LPTBBUTTONINFO
;
481 #endif // !defined(TBIF_SIZE)
483 #endif // wxUSE_TOOLBAR
485 // ----------------------------------------------------------------------------
487 // ----------------------------------------------------------------------------
490 #define TVIS_FOCUSED 0x0001
494 #define TV_FIRST 0x1100
497 #ifndef TVS_CHECKBOXES
498 #define TVS_CHECKBOXES 0x0100
501 #ifndef TVS_FULLROWSELECT
502 #define TVS_FULLROWSELECT 0x1000
505 #ifndef TVM_SETBKCOLOR
506 #define TVM_SETBKCOLOR (TV_FIRST + 29)
507 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
511 #define TVS_INFOTIP 2048
514 #ifndef TVN_GETINFOTIPA
515 #define TVN_GETINFOTIPA (TVN_FIRST-13)
516 #define TVN_GETINFOTIPW (TVN_FIRST-14)
519 #ifndef TVN_GETINFOTIP
521 #define TVN_GETINFOTIP TVN_GETINFOTIPW
523 #define TVN_GETINFOTIP TVN_GETINFOTIPA
527 #if !defined(NMTVGETINFOTIP) && defined(TVN_FIRST)
528 // NB: Check for TVN_FIRST is done so that this code is not included if
529 // <commctrl.h> (which defined HTREEITEM) wasn't included before.
530 struct NMTVGETINFOTIPA
538 struct NMTVGETINFOTIPW
547 #define NMTVGETINFOTIP NMTVGETINFOTIPW
549 #define NMTVGETINFOTIP NMTVGETINFOTIPA
553 // ----------------------------------------------------------------------------
555 // ----------------------------------------------------------------------------
557 #ifndef CCM_SETUNICODEFORMAT
558 #define CCM_SETUNICODEFORMAT 8197
561 #ifndef QS_ALLPOSTMESSAGE
562 #define QS_ALLPOSTMESSAGE 0x0100
565 #ifndef WS_EX_CLIENTEDGE
566 #define WS_EX_CLIENTEDGE 0x00000200L
569 #ifndef ENDSESSION_LOGOFF
570 #define ENDSESSION_LOGOFF 0x80000000
573 #ifndef HANGUL_CHARSET
574 #define HANGUL_CHARSET 129
586 #define TME_QUERY 0x40000000
590 #define TME_CANCEL 0x80000000
593 #ifndef HOVER_DEFAULT
594 #define HOVER_DEFAULT 0xFFFFFFFF
599 #ifndef _TrackMouseEvent
600 #define _TrackMouseEvent TrackMouseEvent
605 // This didn't appear in mingw until 2.95.2
607 #define SIF_TRACKPOS 16
611 #ifndef WM_MOUSEWHEEL
612 #define WM_MOUSEWHEEL 0x020A
615 #define WHEEL_DELTA 120
617 #ifndef SPI_GETWHEELSCROLLLINES
618 #define SPI_GETWHEELSCROLLLINES 104
620 #endif // wxUSE_MOUSEWHEEL
623 #define VK_OEM_1 0xBA
624 #define VK_OEM_2 0xBF
625 #define VK_OEM_3 0xC0
626 #define VK_OEM_4 0xDB
627 #define VK_OEM_5 0xDC
628 #define VK_OEM_6 0xDD
629 #define VK_OEM_7 0xDE
633 #define VK_OEM_PLUS 0xBB
634 #define VK_OEM_COMMA 0xBC
635 #define VK_OEM_MINUS 0xBD
636 #define VK_OEM_PERIOD 0xBE
639 #ifndef WM_UPDATEUISTATE
640 #define WM_UPDATEUISTATE 0x128
643 #ifndef UIS_INITIALIZE
644 #define UIS_INITIALIZE 3
647 #ifndef UISF_HIDEFOCUS
648 #define UISF_HIDEFOCUS 1
651 #ifndef UISF_HIDEACCEL
652 #define UISF_HIDEACCEL 2
655 #ifndef WC_NO_BEST_FIT_CHARS
656 #define WC_NO_BEST_FIT_CHARS 0x400
660 #define OFN_EXPLORER 0x00080000
663 #ifndef OFN_ENABLESIZING
664 #define OFN_ENABLESIZING 0x00800000
667 // ------------------ For Flashing Window -------------
668 #if (defined(__BORLANDC__) && (__BORLANDC__ < 550))
675 } FLASHWINFO
, *PFLASHWINFO
;
678 // In addition, include stuff not defined in WinCE
680 #include "wx/msw/wince/missing.h"