From 7391216edcb95b4e125c310120cf4b877c89073b Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 23 Apr 2002 16:18:26 +0000 Subject: [PATCH] added wx/msw/missing.h git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tmake/filelist.txt | 1 + include/wx/msw/missing.h | 184 +++++++++++++++++++++++++++++++++ src/gtk/files.lst | 1 + src/gtk1/files.lst | 1 + src/mac/carbon/files.lst | 1 + src/mac/files.lst | 1 + src/mgl/files.lst | 1 + src/microwin/files.lst | 2 + src/motif/files.lst | 1 + src/msw/files.lst | 2 + src/msw/helpchm.cpp | 58 +---------- src/msw/listctrl.cpp | 104 +------------------ src/wxBase.dsp | 4 + src/wxUniv.dsp | 4 + src/wxWindows.dsp | 8 ++ src/x11/files.lst | 1 + 16 files changed, 214 insertions(+), 160 deletions(-) create mode 100644 include/wx/msw/missing.h diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index 9f75a5646e..c1932fe457 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -1281,6 +1281,7 @@ menuitem.h MSWH metafile.h MSWH mimetype.h MSWH Win32Only,Base minifram.h MSWH +missing.h MSWH msgdlg.h MSWH mslu.h MSWH msvcrt.h MSWH diff --git a/include/wx/msw/missing.h b/include/wx/msw/missing.h new file mode 100644 index 0000000000..305910fa64 --- /dev/null +++ b/include/wx/msw/missing.h @@ -0,0 +1,184 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: missing.h +// Purpose: Declarations for parts of the Win32 SDK that are missing in +// the version that comes with some compilers +// Created: 2002/04/23 +// RCS-ID: $Id$ +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MISSING_H_ +#define _WX_MISSING_H_ + +// ---------------------------------------------------------------------------- +// ListView common control +// ---------------------------------------------------------------------------- + +#ifndef LVHT_ONITEM + #define LVHT_ONITEM \ + (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON) +#endif + +#ifndef LVM_SETEXTENDEDLISTVIEWSTYLE + #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54) +#endif + +#ifndef LVS_EX_FULLROWSELECT + #define LVS_EX_FULLROWSELECT 0x00000020 +#endif + +#ifndef LVS_OWNERDATA + #define LVS_OWNERDATA 0x1000 +#endif + +#ifndef LVM_FIRST + #define LVM_FIRST 0x1000 +#endif + +#ifndef HDM_FIRST + #define HDM_FIRST 0x1200 +#endif + +// mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff +#ifndef NM_CACHEHINT + typedef struct tagNMLVCACHEHINT + { + NMHDR hdr; + int iFrom; + int iTo; + } NMLVCACHEHINT; + + #define NM_CACHEHINT NMLVCACHEHINT +#endif + +#ifndef LVN_ODCACHEHINT + #define LVN_ODCACHEHINT (-113) +#endif + +#ifndef ListView_GetHeader + #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0) +#endif + +#ifndef LVM_GETHEADER + #define LVM_GETHEADER (LVM_FIRST+31) +#endif + +#ifndef Header_GetItemRect + #define Header_GetItemRect(w,i,r) \ + (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r)) +#endif + +#ifndef HDM_GETITEMRECT + #define HDM_GETITEMRECT (HDM_FIRST+7) +#endif + +#ifndef LVCF_IMAGE + #define LVCF_IMAGE 0x0010 +#endif + +#ifndef LVCFMT_BITMAP_ON_RIGHT + #define LVCFMT_BITMAP_ON_RIGHT 0x1000 +#endif + +#if defined(__GNUWIN32__) && !defined(LV_ITEM) \ + && !wxCHECK_W32API_VERSION( 0, 5 ) +typedef struct _LVITEMW { + UINT mask; + int iItem; + int iSubItem; + UINT state; + UINT stateMask; + LPWSTR pszText; + int cchTextMax; + int iImage; + LPARAM lParam; +#if (_WIN32_IE >= 0x0300) + int iIndent; +#endif +} LV_ITEMW; +typedef LV_ITEM LV_ITEMA; +#endif + +#if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 ) +#ifndef LV_DISPINFOA +typedef struct tagNMLVDISPINFOA { + NMHDR hdr; + LV_ITEMA item; +} NMLVDISPINFOA, FAR *LPNMLVDISPINFOA; +#define _LV_DISPINFOA tagNMLVDISPINFOA +#define LV_DISPINFOA NMLVDISPINFOA +#endif +#ifndef LV_DISPINFOW +typedef struct tagNMLVDISPINFOW { + NMHDR hdr; + LV_ITEMW item; +} NMLVDISPINFOW, FAR *LPNMLVDISPINFOW; +#define _LV_DISPINFOW tagNMLVDISPINFOW +#define LV_DISPINFOW NMLVDISPINFOW +#endif +#endif + + +// ---------------------------------------------------------------------------- +// MS HTML Help +// ---------------------------------------------------------------------------- + +// instead of including htmlhelp.h, duplicate the things from it we need here: + +enum +{ + HH_DISPLAY_TOPIC, + HH_DISPLAY_TOC, + HH_DISPLAY_INDEX, + HH_DISPLAY_SEARCH, + HH_SET_WIN_TYPE, + HH_GET_WIN_TYPE, + HH_GET_WIN_HANDLE, + HH_ENUM_INFO_TYPE, + HH_SET_INFO_TYPE, + HH_SYNC, + HH_RESERVED1, + HH_RESERVED2, + HH_RESERVED3, + HH_KEYWORD_LOOKUP, + HH_DISPLAY_TEXT_POPUP, + HH_HELP_CONTEXT, + HH_TP_HELP_CONTEXTMENU, + HH_TP_HELP_WM_HELP, + HH_CLOSE_ALL, + HH_ALINK_LOOKUP, + HH_GET_LAST_ERROR, + HH_ENUM_CATEGORY, + HH_ENUM_CATEGORY_IT, + HH_RESET_IT_FILTER, + HH_SET_INCLUSIVE_FILTER, + HH_SET_EXCLUSIVE_FILTER +}; + +struct HH_POPUP +{ + int cbStruct; + HINSTANCE hinst; + UINT idString; + LPCTSTR pszText; + POINT pt; + COLORREF clrForeground; + COLORREF clrBackground; + RECT rcMargins; + LPCTSTR pszFont; +}; + +struct HH_AKLINK +{ + int cbStruct; + BOOL fReserved; + LPCTSTR pszKeywords; + LPCTSTR pszUrl; + LPCTSTR pszMsgText; + LPCTSTR pszMsgTitle; + LPCTSTR pszWindow; + BOOL fIndexOnFail; +}; + +#endif + // _WX_MISSING_H_ diff --git a/src/gtk/files.lst b/src/gtk/files.lst index 955714a70f..c974c31602 100644 --- a/src/gtk/files.lst +++ b/src/gtk/files.lst @@ -384,6 +384,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ diff --git a/src/gtk1/files.lst b/src/gtk1/files.lst index 955714a70f..c974c31602 100644 --- a/src/gtk1/files.lst +++ b/src/gtk1/files.lst @@ -384,6 +384,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ diff --git a/src/mac/carbon/files.lst b/src/mac/carbon/files.lst index 33ddee3faf..78bd42f509 100644 --- a/src/mac/carbon/files.lst +++ b/src/mac/carbon/files.lst @@ -390,6 +390,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ diff --git a/src/mac/files.lst b/src/mac/files.lst index 33ddee3faf..78bd42f509 100644 --- a/src/mac/files.lst +++ b/src/mac/files.lst @@ -390,6 +390,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ diff --git a/src/mgl/files.lst b/src/mgl/files.lst index 9574b76fc3..1455262202 100644 --- a/src/mgl/files.lst +++ b/src/mgl/files.lst @@ -345,6 +345,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ diff --git a/src/microwin/files.lst b/src/microwin/files.lst index 878c570941..a44d985f8a 100644 --- a/src/microwin/files.lst +++ b/src/microwin/files.lst @@ -345,6 +345,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ @@ -521,6 +522,7 @@ ALL_HEADERS = \ msw/metafile.h \ msw/mimetype.h \ msw/minifram.h \ + msw/missing.h \ msw/msgdlg.h \ msw/mslu.h \ msw/msvcrt.h \ diff --git a/src/motif/files.lst b/src/motif/files.lst index 53e7dce060..099680f545 100644 --- a/src/motif/files.lst +++ b/src/motif/files.lst @@ -375,6 +375,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ diff --git a/src/msw/files.lst b/src/msw/files.lst index 8742a5817f..69ddf7699a 100644 --- a/src/msw/files.lst +++ b/src/msw/files.lst @@ -406,6 +406,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ @@ -582,6 +583,7 @@ ALL_HEADERS = \ msw/metafile.h \ msw/mimetype.h \ msw/minifram.h \ + msw/missing.h \ msw/msgdlg.h \ msw/mslu.h \ msw/msvcrt.h \ diff --git a/src/msw/helpchm.cpp b/src/msw/helpchm.cpp index ab91913ff2..20e0bbc27e 100644 --- a/src/msw/helpchm.cpp +++ b/src/msw/helpchm.cpp @@ -33,63 +33,7 @@ #endif #include "wx/msw/private.h" - -// instead of including htmlhelp.h, duplicate the things from it we need here - -enum -{ - HH_DISPLAY_TOPIC, - HH_DISPLAY_TOC, - HH_DISPLAY_INDEX, - HH_DISPLAY_SEARCH, - HH_SET_WIN_TYPE, - HH_GET_WIN_TYPE, - HH_GET_WIN_HANDLE, - HH_ENUM_INFO_TYPE, - HH_SET_INFO_TYPE, - HH_SYNC, - HH_RESERVED1, - HH_RESERVED2, - HH_RESERVED3, - HH_KEYWORD_LOOKUP, - HH_DISPLAY_TEXT_POPUP, - HH_HELP_CONTEXT, - HH_TP_HELP_CONTEXTMENU, - HH_TP_HELP_WM_HELP, - HH_CLOSE_ALL, - HH_ALINK_LOOKUP, - HH_GET_LAST_ERROR, - HH_ENUM_CATEGORY, - HH_ENUM_CATEGORY_IT, - HH_RESET_IT_FILTER, - HH_SET_INCLUSIVE_FILTER, - HH_SET_EXCLUSIVE_FILTER -}; - -struct HH_POPUP -{ - int cbStruct; - HINSTANCE hinst; - UINT idString; - LPCTSTR pszText; - POINT pt; - COLORREF clrForeground; - COLORREF clrBackground; - RECT rcMargins; - LPCTSTR pszFont; -}; - -struct HH_AKLINK -{ - int cbStruct; - BOOL fReserved; - LPCTSTR pszKeywords; - LPCTSTR pszUrl; - LPCTSTR pszMsgText; - LPCTSTR pszMsgTitle; - LPCTSTR pszWindow; - BOOL fIndexOnFail; -}; +#include "wx/msw/missing.h" // ---------------------------------------------------------------------------- // utility functions to manage the loading/unloading diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index e95f417a95..5c0482fb6a 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -51,109 +51,7 @@ #include #endif -#ifndef LVHT_ONITEM - #define LVHT_ONITEM \ - (LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON) -#endif - -#ifndef LVM_SETEXTENDEDLISTVIEWSTYLE - #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54) -#endif - -#ifndef LVS_EX_FULLROWSELECT - #define LVS_EX_FULLROWSELECT 0x00000020 -#endif - -#ifndef LVS_OWNERDATA - #define LVS_OWNERDATA 0x1000 -#endif - -#ifndef LVM_FIRST - #define LVM_FIRST 0x1000 -#endif - -#ifndef HDM_FIRST - #define HDM_FIRST 0x1200 -#endif - -// mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff -#ifndef NM_CACHEHINT - typedef struct tagNMLVCACHEHINT - { - NMHDR hdr; - int iFrom; - int iTo; - } NMLVCACHEHINT; - - #define NM_CACHEHINT NMLVCACHEHINT -#endif - -#ifndef LVN_ODCACHEHINT - #define LVN_ODCACHEHINT (-113) -#endif - -#ifndef ListView_GetHeader - #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0) -#endif - -#ifndef LVM_GETHEADER - #define LVM_GETHEADER (LVM_FIRST+31) -#endif - -#ifndef Header_GetItemRect - #define Header_GetItemRect(w,i,r) \ - (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r)) -#endif - -#ifndef HDM_GETITEMRECT - #define HDM_GETITEMRECT (HDM_FIRST+7) -#endif - -#ifndef LVCF_IMAGE - #define LVCF_IMAGE 0x0010 -#endif - -#ifndef LVCFMT_BITMAP_ON_RIGHT - #define LVCFMT_BITMAP_ON_RIGHT 0x1000 -#endif - -#if defined(__GNUWIN32__) && !defined(LV_ITEM) \ - && !wxCHECK_W32API_VERSION( 0, 5 ) -typedef struct _LVITEMW { - UINT mask; - int iItem; - int iSubItem; - UINT state; - UINT stateMask; - LPWSTR pszText; - int cchTextMax; - int iImage; - LPARAM lParam; -#if (_WIN32_IE >= 0x0300) - int iIndent; -#endif -} LV_ITEMW; -typedef LV_ITEM LV_ITEMA; -#endif - -#if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 ) -#ifndef LV_DISPINFOA -typedef struct tagNMLVDISPINFOA { - NMHDR hdr; - LV_ITEMA item; -} NMLVDISPINFOA, FAR *LPNMLVDISPINFOA; -#define _LV_DISPINFOA tagNMLVDISPINFOA -#define LV_DISPINFOA NMLVDISPINFOA -#endif -#ifndef LV_DISPINFOW -typedef struct tagNMLVDISPINFOW { - NMHDR hdr; - LV_ITEMW item; -} NMLVDISPINFOW, FAR *LPNMLVDISPINFOW; -#define _LV_DISPINFOW tagNMLVDISPINFOW -#define LV_DISPINFOW NMLVDISPINFOW -#endif -#endif +#include "wx/msw/missing.h" // ---------------------------------------------------------------------------- // private functions diff --git a/src/wxBase.dsp b/src/wxBase.dsp index 6b1e52b6b9..4922351c9d 100644 --- a/src/wxBase.dsp +++ b/src/wxBase.dsp @@ -813,6 +813,10 @@ SOURCE=..\include\wx\ioswrap.h # End Source File # Begin Source File +SOURCE=..\include\wx\ipc.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\ipcbase.h # End Source File # Begin Source File diff --git a/src/wxUniv.dsp b/src/wxUniv.dsp index 196200057b..f5e5ea109e 100644 --- a/src/wxUniv.dsp +++ b/src/wxUniv.dsp @@ -1694,6 +1694,10 @@ SOURCE=..\include\wx\ioswrap.h # End Source File # Begin Source File +SOURCE=..\include\wx\ipc.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\ipcbase.h # End Source File # Begin Source File diff --git a/src/wxWindows.dsp b/src/wxWindows.dsp index a4b8d193ad..2b6b8f084f 100644 --- a/src/wxWindows.dsp +++ b/src/wxWindows.dsp @@ -1974,6 +1974,10 @@ SOURCE=..\include\wx\ioswrap.h # End Source File # Begin Source File +SOURCE=..\include\wx\ipc.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\ipcbase.h # End Source File # Begin Source File @@ -2679,6 +2683,10 @@ SOURCE=..\include\wx\msw\minifram.h # End Source File # Begin Source File +SOURCE=..\include\wx\msw\missing.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\msw\msgdlg.h # End Source File # Begin Source File diff --git a/src/x11/files.lst b/src/x11/files.lst index 52fdd69030..39055001e6 100644 --- a/src/x11/files.lst +++ b/src/x11/files.lst @@ -354,6 +354,7 @@ ALL_HEADERS = \ imagxpm.h \ intl.h \ ioswrap.h \ + ipc.h \ ipcbase.h \ isql.h \ isqlext.h \ -- 2.45.2