]>
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
31 #ifndef LVS_EX_LABELTIP
32 #define LVS_EX_LABELTIP 0x00004000
36 #define LVS_OWNERDATA 0x1000
40 #define LVM_FIRST 0x1000
44 #define HDM_FIRST 0x1200
47 #ifndef LVCFMT_JUSTIFYMASK
48 #define LVCFMT_JUSTIFYMASK 0x0003
51 #ifndef LVSICF_NOSCROLL
52 #define LVSICF_NOINVALIDATEALL 0x0001
53 #define LVSICF_NOSCROLL 0x0002
56 // mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff
58 typedef struct tagNMLVCACHEHINT
65 #define NM_CACHEHINT NMLVCACHEHINT
68 #ifndef LVN_ODCACHEHINT
69 #define LVN_ODCACHEHINT (-113)
72 #ifndef ListView_GetHeader
73 #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0)
77 #define LVM_GETHEADER (LVM_FIRST+31)
80 #ifndef Header_GetItemRect
81 #define Header_GetItemRect(w,i,r) \
82 (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
85 #ifndef HDM_GETITEMRECT
86 #define HDM_GETITEMRECT (HDM_FIRST+7)
90 #define LVCF_IMAGE 0x0010
93 #ifndef LVCFMT_BITMAP_ON_RIGHT
94 #define LVCFMT_BITMAP_ON_RIGHT 0x1000
97 #if defined(__GNUWIN32__) && !defined(LV_ITEM) \
98 && !wxCHECK_W32API_VERSION( 0, 5 )
99 typedef struct _LVITEMW
{
109 #if (_WIN32_IE >= 0x0300)
114 typedef struct tagLVITEMA
125 #if (_WIN32_IE >= 0x0300)
130 #define LV_ITEM LV_ITEMA;
133 #ifndef ListView_GetColumnWidth
134 #define ListView_GetColumnWidth(hwnd, iCol) \
135 (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
138 #ifndef ListView_SetColumnWidth
139 #define ListView_SetColumnWidth(hwnd, iCol, cx) \
140 (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
143 #ifndef ListView_GetTextColor
144 #define ListView_GetTextColor(hwnd) \
145 (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
148 #ifndef ListView_FindItem
149 #define ListView_FindItem(hwnd, iStart, plvfi) \
150 (int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO FAR*)(plvfi))
153 #if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
155 typedef struct tagNMLVDISPINFOA
{
158 } NMLVDISPINFOA
, FAR
*LPNMLVDISPINFOA
;
159 #define _LV_DISPINFOA tagNMLVDISPINFOA
160 #define LV_DISPINFOA NMLVDISPINFOA
163 typedef struct tagNMLVDISPINFOW
{
166 } NMLVDISPINFOW
, FAR
*LPNMLVDISPINFOW
;
167 #define _LV_DISPINFOW tagNMLVDISPINFOW
168 #define LV_DISPINFOW NMLVDISPINFOW
172 #if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined (__MINGW32__) || defined(__DIGITALMARS__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
173 #define HDN_GETDISPINFOW (HDN_FIRST-29)
174 #if !wxCHECK_W32API_VERSION(2, 2)
183 } NMHDDISPINFOW
, *LPNMHDDISPINFOW
;
187 #ifndef LVM_SETUNICODEFORMAT
188 #define LVM_SETUNICODEFORMAT 0x2005
191 // ----------------------------------------------------------------------------
192 // Common Control missing
193 // ----------------------------------------------------------------------------
194 // __DMC__ date time control IDs
197 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
198 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
200 #define ICC_DATE_CLASSES 256
202 #if (_WIN32_IE >= 0x0300)
203 typedef struct tagINITCOMMONCONTROLSEX
{
206 } INITCOMMONCONTROLSEX
,*LPINITCOMMONCONTROLSEX
;
217 #define DTS_SHOWNONE 2
218 #define DTS_SHORTDATEFORMAT 0
219 #define DTS_LONGDATEFORMAT 4
220 #define DTS_TIMEFORMAT 9
221 #define DTS_APPCANPARSE 16
222 #define DTS_RIGHTALIGN 32
223 #if ( _WIN32_IE >= 0x500 )
224 #define DTS_SHORTDATECENTURYFORMAT 0x000C
225 #endif /* _WIN32_IE >= 0x500 */
230 #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
231 #define DATETIMEPICK_CLASSA "SysDateTimePick32"
234 #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
236 #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
239 #define DTM_GETSYSTEMTIME 0x1001
240 #define DTM_SETSYSTEMTIME 0x1002
241 #define DTM_GETRANGE 0x1003
242 #define DTM_SETRANGE 0x1004
243 #define DTN_DATETIMECHANGE ((UINT)-759)
245 #define DateTime_GetMonthCal(hwnd) SNDMSG(hwnd, DTM_GETMONTHCAL, 0, 0)
246 #define DateTime_GetMonthCalColor(hwnd, icolor) SNDMSG(hwnd, DTM_GETMONTHCAL, (WPARAM)icolor,0)
247 #define DateTime_GetMonthCalFont(hwnd) SNDMSG(hwnd,DTM_GETMCFONT,0,0)
248 #define DateTime_GetRange(hwnd,lpsystimearray) SNDMSG(hwnd,DTM_GETRANGE,0,(LPARAM)lpsystimearray)
249 #define DateTime_GetSystemTime(hwnd,lpsystime) SNDMSG(hwnd,DTM_GETSYSTEMTIME,0,(LPARAM)lpsystime)
250 #define DateTime_SetFormat(hwnd,lpszformat) SNDMSG(hwnd,DTM_SETFORMAT,0,(LPARAM)lpszformat)
251 #define DateTime_SetMonthCalColor(hwnd,icolor,clr) SNDMSG(hwnd,DTM_SETMCCOLOR,(WPARAM)icolor,(LPARAM)clr)
252 #define DateTime_SetMonthCalFont(hwnd,hfont,lparam) SNDMSG(hwnd,DTM_SETMCFONT,(WPARAM)hfont,(LPARAM)lparam)
253 #define DateTime_SetRange(hwnd,flags,lpsystimearray) SNDMSG(hwnd,DTM_SETRANGE,(WPARAM)flags,(LPARAM)lpsystimearray)
254 #define DateTime_SetSystemTime(hwnd,flag,lpsystime) SNDMSG(hwnd,DTM_SETSYSTEMTIME,(WPARAM)flag,(LPARAM)lpsystime)
257 #endif //__DMC__ date time control IDs
259 #if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 2, 4 ) || defined (__DMC__)
260 typedef struct tagNMDATETIMECHANGE
266 #endif // old gcc headers
268 // ----------------------------------------------------------------------------
269 // Toolbar define value missing
270 // ----------------------------------------------------------------------------
271 #if !defined(CCS_VERT)
272 #define CCS_VERT 0x00000080L
275 // ----------------------------------------------------------------------------
277 // ----------------------------------------------------------------------------
279 // instead of including htmlhelp.h, duplicate the things from it we need here:
297 HH_DISPLAY_TEXT_POPUP
,
299 HH_TP_HELP_CONTEXTMENU
,
307 HH_SET_INCLUSIVE_FILTER
,
308 HH_SET_EXCLUSIVE_FILTER
318 COLORREF clrForeground
;
319 COLORREF clrBackground
;
336 // ----------------------------------------------------------------------------
337 // SHGetFileInfo-related things
338 // ----------------------------------------------------------------------------
340 #ifndef SHGetFileInfo
342 #define SHGetFileInfo SHGetFileInfoW
344 #define SHGetFileInfo SHGetFileInfoA
348 #ifndef SHGFI_ATTRIBUTES
349 #define SHGFI_ATTRIBUTES 2048
352 #ifndef SFGAO_READONLY
353 #define SFGAO_READONLY 0x00040000L
356 #ifndef SFGAO_REMOVABLE
357 #define SFGAO_REMOVABLE 0x02000000L
360 #ifndef SHGFI_DISPLAYNAME
361 #define SHGFI_DISPLAYNAME 512
365 #define SHGFI_ICON 256
368 #ifndef SHGFI_SMALLICON
369 #define SHGFI_SMALLICON 1
372 #ifndef SHGFI_SHELLICONSIZE
373 #define SHGFI_SHELLICONSIZE 4
376 #ifndef SHGFI_OPENICON
377 #define SHGFI_OPENICON 2
380 // ----------------------------------------------------------------------------
382 // ----------------------------------------------------------------------------
384 #if wxUSE_RICHEDIT && defined(MAX_TAB_STOPS)
386 // old mingw32 doesn't define this
388 #define CFM_CHARSET 0x08000000
389 #endif // CFM_CHARSET
391 #ifndef CFM_BACKCOLOR
392 #define CFM_BACKCOLOR 0x04000000
395 // cygwin does not have these defined for richedit
397 #define ENM_LINK 0x04000000
400 #ifndef EM_AUTOURLDETECT
401 #define EM_AUTOURLDETECT (WM_USER + 91)
405 #define EN_LINK 0x070b
407 typedef struct _enlink
418 #define SF_UNICODE 0x0010
421 // Watcom C++ doesn't define this
423 #define SCF_ALL 0x0004
427 #define PFA_JUSTIFY 4
429 typedef struct _paraformat2
{
439 LONG rgxTabs
[MAX_TAB_STOPS
];
444 BYTE bLineSpacingRule
;
448 WORD wNumberingStart
;
449 WORD wNumberingStyle
;
455 #define wxEffects wReserved
459 #endif // wxUSE_RICHEDIT
461 // ----------------------------------------------------------------------------
463 // ----------------------------------------------------------------------------
467 #if !defined(TBIF_SIZE)
470 #define TB_SETBUTTONINFO (WM_USER+66)
483 } TBBUTTONINFO
, *LPTBBUTTONINFO
;
485 #endif // !defined(TBIF_SIZE)
487 #if !defined(TB_SETDISABLEDIMAGELIST)
488 #define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
489 #endif // !defined(TB_SETDISABLEDIMAGELIST)
491 #endif // wxUSE_TOOLBAR
493 // ----------------------------------------------------------------------------
495 // ----------------------------------------------------------------------------
498 #define TVIS_FOCUSED 0x0001
502 #define TV_FIRST 0x1100
505 #ifndef TVS_CHECKBOXES
506 #define TVS_CHECKBOXES 0x0100
509 #ifndef TVS_FULLROWSELECT
510 #define TVS_FULLROWSELECT 0x1000
513 #ifndef TVM_SETBKCOLOR
514 #define TVM_SETBKCOLOR (TV_FIRST + 29)
515 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
519 #define TVS_INFOTIP 2048
522 #ifndef TVN_GETINFOTIPA
523 #define TVN_GETINFOTIPA (TVN_FIRST-13)
524 #define TVN_GETINFOTIPW (TVN_FIRST-14)
527 #ifndef TVN_GETINFOTIP
529 #define TVN_GETINFOTIP TVN_GETINFOTIPW
531 #define TVN_GETINFOTIP TVN_GETINFOTIPA
535 #if !defined(NMTVGETINFOTIP) && defined(TVN_FIRST)
536 // NB: Check for TVN_FIRST is done so that this code is not included if
537 // <commctrl.h> (which defined HTREEITEM) wasn't included before.
538 struct NMTVGETINFOTIPA
546 struct NMTVGETINFOTIPW
555 #define NMTVGETINFOTIP NMTVGETINFOTIPW
557 #define NMTVGETINFOTIP NMTVGETINFOTIPA
561 // ----------------------------------------------------------------------------
563 // ----------------------------------------------------------------------------
565 #ifndef CCM_SETUNICODEFORMAT
566 #define CCM_SETUNICODEFORMAT 8197
569 #ifndef QS_ALLPOSTMESSAGE
570 #define QS_ALLPOSTMESSAGE 0x0100
573 #ifndef WS_EX_TRANSPARENT
574 #define WS_EX_TRANSPARENT 0x00000020L
577 #ifndef WS_EX_CLIENTEDGE
578 #define WS_EX_CLIENTEDGE 0x00000200L
581 #ifndef ENDSESSION_LOGOFF
582 #define ENDSESSION_LOGOFF 0x80000000
585 #ifndef HANGUL_CHARSET
586 #define HANGUL_CHARSET 129
598 #define TME_QUERY 0x40000000
602 #define TME_CANCEL 0x80000000
605 #ifndef HOVER_DEFAULT
606 #define HOVER_DEFAULT 0xFFFFFFFF
611 #ifndef _TrackMouseEvent
612 #define _TrackMouseEvent TrackMouseEvent
617 // This didn't appear in mingw until 2.95.2
619 #define SIF_TRACKPOS 16
623 #ifndef WM_MOUSEWHEEL
624 #define WM_MOUSEWHEEL 0x020A
627 #define WHEEL_DELTA 120
629 #ifndef SPI_GETWHEELSCROLLLINES
630 #define SPI_GETWHEELSCROLLLINES 104
632 #endif // wxUSE_MOUSEWHEEL
635 #define VK_OEM_1 0xBA
636 #define VK_OEM_2 0xBF
637 #define VK_OEM_3 0xC0
638 #define VK_OEM_4 0xDB
639 #define VK_OEM_5 0xDC
640 #define VK_OEM_6 0xDD
641 #define VK_OEM_7 0xDE
645 #define VK_OEM_PLUS 0xBB
646 #define VK_OEM_COMMA 0xBC
647 #define VK_OEM_MINUS 0xBD
648 #define VK_OEM_PERIOD 0xBE
651 #ifndef WM_CONTEXTMENU
652 #define WM_CONTEXTMENU 0x007B
655 #ifndef WM_UPDATEUISTATE
656 #define WM_UPDATEUISTATE 0x0128
659 #ifndef WM_PRINTCLIENT
660 #define WM_PRINTCLIENT 0x318
663 #ifndef UIS_INITIALIZE
664 #define UIS_INITIALIZE 3
667 #ifndef UISF_HIDEFOCUS
668 #define UISF_HIDEFOCUS 1
671 #ifndef UISF_HIDEACCEL
672 #define UISF_HIDEACCEL 2
675 #ifndef WC_NO_BEST_FIT_CHARS
676 #define WC_NO_BEST_FIT_CHARS 0x400
680 #define OFN_EXPLORER 0x00080000
683 #ifndef OFN_ENABLESIZING
684 #define OFN_ENABLESIZING 0x00800000
687 // ------------------ For Flashing Window -------------
688 #if (defined(__BORLANDC__) && (__BORLANDC__ < 550))
695 } FLASHWINFO
, *PFLASHWINFO
;
698 // In addition, include stuff not defined in WinCE
700 #include "wx/msw/wince/missing.h"