From: Julian Smart Date: Fri, 8 Jan 1999 14:30:22 +0000 (+0000) Subject: Corrected grey scrolling windows; added C++Builder 3.0 fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3f1af9204f1813a10e2c59a5f9b28a7eec630861 Corrected grey scrolling windows; added C++Builder 3.0 fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/motif/todo.txt b/docs/motif/todo.txt index 63254e2da6..c319bc30db 100644 --- a/docs/motif/todo.txt +++ b/docs/motif/todo.txt @@ -13,8 +13,8 @@ Also, grep for TODO comments in source. High Priority ------------- -- Work out why XFreeFont in font.cpp produces a segv. This is - currently commented out, which presumably causes a memory leak. +- Have a central/per app file for colour settings, with a wxWin + app to allow changing settings interactively. - Colour setting in widgets (almost done). Should scrollbars take on the background colour? Not right for e.g. wxScrolledWindows, @@ -42,15 +42,12 @@ High Priority - Miscellaneous events. -- Thread classes (copy wxGTK's). - -- Write makefiles for all samples and utilities. - -- Create some samples for testing. - Low Priority ------------ +- Work out why XFreeFont in font.cpp produces a segv. This is + currently commented out, which presumably causes a memory leak. + - Better makefile system that can put objects in different dirs. - Extra wxBitmap formats: PNG, BMP. Could use old wxWin 1.68 diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 0cfdf3e556..b73681831b 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -53,11 +53,15 @@ Using makefiles: 3. Change directory to wx\samples and type 'nmake -f makefile.nt' to make all the samples. You can also make them individually. -Notes: if you wish to use templates, please edit +Note (1): if you wish to use templates, please edit include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0. Without this, the redefinition of 'new' will cause problems in the headers. Alternatively, #undef new before including template headers. +Note (2): libraries and applications generated with makefiles and +project files are unlikely to be compatible, so use one method or +the other. + Visual C++ 1.5 compilation -------------------------- @@ -91,8 +95,9 @@ Borland C++Builder compilation ------------------------------ C++Builder compilation is the same as for Borland C++ above. -It has only been tested with C++Builder 1.0 so far, and no -project files are currently supplied. + +Tested with C++Builder 1.0 and 3.0. Only makefiles are currently +supplied. Watcom C++ 10.6 compilation --------------------------- @@ -113,6 +118,24 @@ Metrowerks CodeWarrior compilation Further project files for samples will be available in due course. +Symantec C++ compilation +------------------------ + +1. Make sure your WXWIN variable is set, and uses the FAT (short + name) form. +2. Edit setup.h and set wxUSE_DRAG_AND_DROP to 0. +3. Change directory to wx\src\msw. Type 'make -f makefile.sc' to + make the wxWindows core library. +4. Change directory to wx\samples\minimal and type 'make -f makefile.sc' + to make this sample. + +Note: the minimal sample doesn't link properly ('Error: no +start address'). +32-bit compilation only (partially) supported at present, using SC++ 6.1. +Some functionality is missing using this compiler (see makefile). +Add -D__WIN95__ if your SC++ has Windows 95 support, and ignore +Step (2). 16-bit compilation is left as an excercise for the user! + Gnu-Win32 b19/b20/Mingw32 compilation ------------------------------------- diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt index 85f37b2ec2..6e19165510 100644 --- a/docs/msw/todo.txt +++ b/docs/msw/todo.txt @@ -35,6 +35,12 @@ e.g. ',' instead of '.' for decimal points. Supply correct ctl3d/odbc lib files for BC++, Watcom (corrupt?) +16-bit compilation: replace small icons in treectrl/listctrl +samples that also have a 32x32 icon, with icons with only one +image, using Borland Image Editor. WIN16 doesn't have a function +for specifying which image to use, so the larger one gets used +erroneously. + LOW PRIORITY (MEDIUM TERM) -------------------------- diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index 53f68e1e7a..8c1d964c08 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -16,7 +16,9 @@ #pragma interface "checklst.h" #endif -typedef unsigned int size_t; +// No! +// typedef unsigned int size_t; +#include #if !wxUSE_OWNER_DRAWN #error "wxCheckListBox class requires owner-drawn functionality." diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index 7e3133f0c8..bba7bd5f81 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -23,6 +23,19 @@ #include "wx/gdicmn.h" #include "wx/window.h" +// Clash with Windows header files +#ifdef StartDoc +#undef StartDoc +#endif + +#ifdef DrawText +#undef DrawText +#endif + +#ifdef GetCharWidth +#undef GetCharWidth +#endif + class WXDLLEXPORT wxDC: public wxObject { DECLARE_ABSTRACT_CLASS(wxDC) diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index 2648217d19..1087b17903 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -135,9 +135,6 @@ // Set this to 0 if your compiler can't cope // with omission of prototype parameters. -#define wxUSE_C_MAIN 0 - // Set to 1 to use main.c instead of main.cpp (UNIX only) - #define wxUSE_ODBC 1 // Define 1 to use ODBC classes diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 5a3c475644..6999805922 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -34,7 +34,7 @@ class WXDLLEXPORT wxTextCtrl: public wxControl // it complains about deriving a huge class from the huge class streambuf. !! // Also, can't use streambuf if making or using a DLL :-( -#if (defined(__BORLANDC__) && !defined(__WIN32__)) || defined(__MWERKS__) || defined(_WINDLL) || defined(WXUSINGDLL) || defined(WXMAKINGDLL) +#if (defined(__BORLANDC__)) || defined(__MWERKS__) || defined(_WINDLL) || defined(WXUSINGDLL) || defined(WXMAKINGDLL) #define NO_TEXT_WINDOW_STREAM #endif diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 8f151883fb..21d27e908b 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -108,6 +108,15 @@ private: wxString m_data; }; +// Clash with Windows headers +#ifdef GetCharWidth +#undef GetCharWidth +#endif + +#ifdef FindWindow +#undef FindWindow +#endif + class WXDLLEXPORT wxWindow : public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxWindow) diff --git a/include/wx/object.h b/include/wx/object.h index ca3ade770a..b16265669a 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -23,11 +23,14 @@ class WXDLLEXPORT wxObject; #if wxUSE_DYNAMIC_CLASSES -#ifdef __GNUWIN32__ +// #ifdef __GNUWIN32__ #ifdef GetClassName #undef GetClassName #endif +#ifdef GetClassInfo +#undef GetClassInfo #endif +// #endif class WXDLLEXPORT wxClassInfo; class WXDLLEXPORT wxInputStream; diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h index 7726a31f1e..ee4c465030 100644 --- a/include/wx/ownerdrw.h +++ b/include/wx/ownerdrw.h @@ -17,7 +17,10 @@ #endif typedef wxColour wxColor; -typedef unsigned int size_t; + +// No, don't do this: BC++ 5 complains that size_t already been defined. +// typedef unsigned int size_t; +#include // ---------------------------------------------------------------------------- // wxOwnerDrawn - a mix-in base class, derive from it to implement owner-drawn diff --git a/include/wx/version.h b/include/wx/version.h index 5426016a32..deafa618a1 100644 --- a/include/wx/version.h +++ b/include/wx/version.h @@ -19,7 +19,7 @@ #define wxVERSION_STRING "wxWindows 2.0" #define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER #define wxBETA_NUMBER 17 -#define wxVERSION_FLOAT float(wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)) +#define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) #endif // _WX_VERSIONH__ diff --git a/src/makesc.env b/src/makesc.env index 538c0c6f40..2237f97a55 100644 --- a/src/makesc.env +++ b/src/makesc.env @@ -3,6 +3,7 @@ WXDIR = $(WXWIN) INCDIR = $(WXDIR)\include LIBDIR = $(WXDIR)\lib +WXLIB = $(LIBDIR)\wx.lib SRCSUFF = cpp OBJSUFF = obj @@ -14,8 +15,18 @@ INCLUDE=$(INCDIR) CC=sc RC=rc +# WIN16 settings +#CFLAGS = -Jm -ml -W -D__WXMSW__ -D__WXDEBUG__ -D__WINDOWS__ -D__WIN16__ $(EXTRACPPFLAGS) +#LDFLAGS = -ml -W +#LINKER = link +#LIBS=$(WXLIB) $(EXTRALIBS) libw.lib commdlg.lib ddeml.lib shell.lib +#DEFFILE=sc16.def + +# WIN32 settings CFLAGS = -o -mn -W -D__NT__ -DWIN32 -D__WIN32__ -D__WINDOWS__ -D__WXMSW__ -D__SC__ -D__WXDEBUG__ $(EXTRACPPFLAGS) -LDFLAGS = $(EXTRALDFLAGS) +LDFLAGS = -Llink386.exe $(EXTRALDFLAGS) +LINKER = link386 +LIBS=$(WXLIB) $(EXTRALIBS) ctl3d32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib kernel32.lib winmm.lib .$(SRCSUFF).obj: *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $< -o$@ @@ -24,3 +35,6 @@ LDFLAGS = $(EXTRALDFLAGS) .c.obj: *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) -DUSE_DEFINE -Jm $< -o$@ +.rc.res: + *$(RC) -r -I$(INCLUDE) $< + diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index 36b8332946..3bb6b74e3e 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -246,3 +246,4 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c #$(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp # *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj + diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index abf6eaf5f6..45a17a4423 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -747,7 +747,7 @@ void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event) // or when "endl" is output (Borland 4.5) //========================================================================= // Class declaration using multiple inheritance doesn't work properly for -// Borland. See note in wb_text.h. +// Borland. See note in textctrl.h. #ifndef NO_TEXT_WINDOW_STREAM int wxTextCtrl::overflow(int c) { diff --git a/utils/ogl/samples/ogledit/view.cpp b/utils/ogl/samples/ogledit/view.cpp index 9690182a27..0d8e58232b 100644 --- a/utils/ogl/samples/ogledit/view.cpp +++ b/utils/ogl/samples/ogledit/view.cpp @@ -253,6 +253,7 @@ MyCanvas::MyCanvas(wxView *v, wxWindow *parent, wxWindowID id, const wxPoint& po const wxSize& size, long style): wxShapeCanvas(parent, id, pos, size, style) { + SetBackgroundColour(*wxWHITE); view = v; } diff --git a/utils/wxtree/src/test.cpp b/utils/wxtree/src/test.cpp index 7fa625668f..65198f308b 100644 --- a/utils/wxtree/src/test.cpp +++ b/utils/wxtree/src/test.cpp @@ -183,6 +183,7 @@ END_EVENT_TABLE() MyCanvas::MyCanvas(wxWindow *parent): wxScrolledWindow(parent, -1) { + SetBackgroundColour(*wxWHITE); } // Define the repainting behaviour