From 086b3a5b02f91b0553970b7c68c3bbde7c047ecc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 11 Jul 2003 21:43:57 +0000 Subject: [PATCH] More WinCE mods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/fdrepdlg.h | 2 +- include/wx/fontdlg.h | 3 ++- include/wx/msw/bitmap.h | 4 ++++ include/wx/msw/dib.h | 5 +++++ include/wx/msw/frame.h | 3 +++ include/wx/msw/private.h | 7 +++++++ include/wx/msw/setup0.h | 3 +++ include/wx/msw/wince/setup.h | 23 +++++++++++++---------- include/wx/platform.h | 4 ++++ 9 files changed, 42 insertions(+), 12 deletions(-) diff --git a/include/wx/fdrepdlg.h b/include/wx/fdrepdlg.h index cc27bb9786..f7b3d94185 100644 --- a/include/wx/fdrepdlg.h +++ b/include/wx/fdrepdlg.h @@ -129,7 +129,7 @@ protected: }; // include wxFindReplaceDialog declaration -#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__WXWINCE__) #include "wx/msw/fdrepdlg.h" #else #define wxGenericFindReplaceDialog wxFindReplaceDialog diff --git a/include/wx/fontdlg.h b/include/wx/fontdlg.h index a8a5572e06..0c65857e38 100644 --- a/include/wx/fontdlg.h +++ b/include/wx/fontdlg.h @@ -63,7 +63,8 @@ protected: // platform-specific wxFontDialog implementation // ---------------------------------------------------------------------------- -#if defined(__WXUNIVERSAL__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXCOCOA__) +#if defined(__WXUNIVERSAL__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXCOCOA__) \ + || defined(__WXWINCE__) #include "wx/generic/fontdlgg.h" #define wxFontDialog wxGenericFontDialog #define sm_classwxFontDialog sm_classwxGenericFontDialog diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index c545d275ec..0daef6ee89 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -26,7 +26,9 @@ class WXDLLEXPORT wxBitmapRefData; class WXDLLEXPORT wxControl; class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxDC; +#if wxUSE_WXDIB class WXDLLEXPORT wxDIB; +#endif class WXDLLEXPORT wxIcon; class WXDLLEXPORT wxImage; class WXDLLEXPORT wxMask; @@ -119,8 +121,10 @@ public: // copies the contents and mask of the given cursor to the bitmap bool CopyFromCursor(const wxCursor& cursor); +#if wxUSE_WXDIB // copies from a device independent bitmap bool CopyFromDIB(const wxDIB& dib); +#endif virtual bool Create(int width, int height, int depth = -1); virtual bool Create(int width, int height, const wxDC& dc); diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h index 6a2a40a020..7f0d2ecb07 100644 --- a/include/wx/msw/dib.h +++ b/include/wx/msw/dib.h @@ -17,6 +17,8 @@ class WXDLLEXPORT wxPalette; #include "wx/msw/private.h" +#if wxUSE_WXDIB + // ---------------------------------------------------------------------------- // wxDIB: represents a DIB section // ---------------------------------------------------------------------------- @@ -225,5 +227,8 @@ inline wxDIB::~wxDIB() Free(); } +#endif + // wxUSE_WXDIB + #endif // _WX_MSW_DIB_H_ diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 2416b22a68..4b27759ebf 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -149,6 +149,9 @@ private: #if wxUSE_TOOLTIPS WXHWND m_hwndToolTip; #endif // tooltips +#ifdef __WXWINCE__ + WXHWND m_commandBar; +#endif // used by IconizeChildFrames(), see comments there bool m_wasMinimized; diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 41c090c595..3e5465eec3 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -555,6 +555,9 @@ WXDLLEXPORT extern wxWindow *wxGetWindowFromHWND(WXHWND hwnd); // Get the size of an icon WXDLLEXPORT extern wxSize wxGetHiconSize(HICON hicon); +// Lines are drawn differently for WinCE and regular WIN32 +WXDLLEXPORT void wxDrawLine(HDC hdc, int x1, int y1, int x2, int y2); + // LocalAlloc should be used on WinCE #ifdef __WXWINCE__ #include @@ -563,7 +566,11 @@ WXDLLEXPORT extern wxSize wxGetHiconSize(HICON hicon); #define GlobalFree LocalFree #define GlobalLock(mem) mem #define GlobalUnlock(mem) +#define GlobalSize LocalSize #define GPTR LPTR +#define GHND LPTR +#define GMEM_MOVEABLE 0 +#define GMEM_SHARE 0 #if 0 diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 454b7120cd..d130d0ca25 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -638,6 +638,9 @@ // bitmaps > 16MB on Win95/98/Me. Set to 0 to use DDB's only. #define wxUSE_DIB_FOR_BITMAP 0 +// Set this to 1 to enable wxDIB +#define wxUSE_WXDIB 1 + // ---------------------------------------------------------------------------- // common dialogs // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index a06174ec17..1c92f84b07 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -144,7 +144,7 @@ // Default is 1 // // Recommended setting: 1 if your compiler supports it. -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__WXWINCE__) #define wxUSE_ON_FATAL_EXCEPTION 1 #else #define wxUSE_ON_FATAL_EXCEPTION 0 @@ -284,7 +284,7 @@ // Default is 1 // // Recommended setting: 1 (but may be safely disabled if you don't use it) -#define wxUSE_FSVOLUME 1 +#define wxUSE_FSVOLUME 0 // use wxTextBuffer class: required by wxTextFile #define wxUSE_TEXTBUFFER 1 @@ -486,7 +486,7 @@ #define wxUSE_BMPBUTTON 1 // wxBitmapButton #define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl #define wxUSE_CHECKBOX 1 // wxCheckBox -#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHECKLISTBOX 0 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) #define wxUSE_CHOICE 1 // wxChoice #define wxUSE_COMBOBOX 1 // wxComboBox #define wxUSE_GAUGE 1 // wxGauge @@ -642,6 +642,9 @@ // bitmaps > 16MB on Win95/98/Me. Set to 0 to use DDB's only. #define wxUSE_DIB_FOR_BITMAP 0 +// Set this to 1 to enable wxDIB +#define wxUSE_WXDIB 1 + // ---------------------------------------------------------------------------- // common dialogs // ---------------------------------------------------------------------------- @@ -750,8 +753,8 @@ // Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. // // Recommended setting: default or 0 for everything for portable programs. -#define wxUSE_METAFILE 1 -#define wxUSE_ENH_METAFILE 1 +#define wxUSE_METAFILE 0 +#define wxUSE_ENH_METAFILE 0 #define wxUSE_WIN_METAFILES_ALWAYS 0 // ---------------------------------------------------------------------------- @@ -762,7 +765,7 @@ #define wxUSE_DOC_VIEW_ARCHITECTURE 1 // Set to 0 to disable MDI document/view architecture -#define wxUSE_MDI_ARCHITECTURE 1 +#define wxUSE_MDI_ARCHITECTURE 0 // Set to 0 to disable print/preview architecture code #define wxUSE_PRINTING_ARCHITECTURE 0 @@ -838,7 +841,7 @@ #define wxUSE_DRAGIMAGE 1 -#define wxUSE_IPC 1 +#define wxUSE_IPC 0 // 0 for no interprocess comms #define wxUSE_HELP 0 // 0 for no help facility @@ -1018,11 +1021,11 @@ // Recommended setting: 1, only set it to 0 if your compiler doesn't have // or can't compile #if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__) -#define wxUSE_RICHEDIT 1 +#define wxUSE_RICHEDIT 0 // TODO: This should be ifdef'ed for any compilers that don't support // RichEdit 2.0 but do have RichEdit 1.0... -#define wxUSE_RICHEDIT2 1 +#define wxUSE_RICHEDIT2 0 #else #define wxUSE_RICHEDIT 0 @@ -1035,7 +1038,7 @@ // Default is 1. // // Recommended setting: 1, set to 0 for a small library size reduction -#define wxUSE_OWNER_DRAWN 1 +#define wxUSE_OWNER_DRAWN 0 // Set to 1 to compile MS Windows XP theme engine support #define wxUSE_UXTHEME 0 diff --git a/include/wx/platform.h b/include/wx/platform.h index 3a761c91f3..e2782e7d55 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -357,5 +357,9 @@ #define wxUSE_HOTKEY 0 #endif +#if !defined(wxUSE_WXDIB) && defined(__WXMSW__) + #define wxUSE_WXDIB 1 +#endif + #endif /* _WX_PLATFORM_H_ */ -- 2.47.2