patches from Ricky Gonzales <gonzales@pyramid3.net>:

1. BC++ 5.5 compilation/building fixes
2. wxMSW listctrl will use correct ILC_COLOR flag depending on current display
   depth
3. wxFrame::Show() argument is TRUE by default undet GTK/Motif too


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-03-06 17:16:12 +00:00
parent 6b4a39fb51
commit a6e2b3a831
8 changed files with 21 additions and 11 deletions

View File

@@ -87,7 +87,7 @@ public:
void SetToolBar(wxToolBar *toolbar); void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
virtual bool Show(bool show); virtual bool Show(bool show = TRUE);
virtual void SetTitle( const wxString &title ); virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; } virtual wxString GetTitle() const { return m_title; }

View File

@@ -87,7 +87,7 @@ public:
void SetToolBar(wxToolBar *toolbar); void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
virtual bool Show(bool show); virtual bool Show(bool show = TRUE);
virtual void SetTitle( const wxString &title ); virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; } virtual wxString GetTitle() const { return m_title; }

View File

@@ -43,7 +43,7 @@ public:
virtual ~wxFrame(); virtual ~wxFrame();
bool Show(bool show); virtual bool Show(bool show = TRUE);
// Set menu bar // Set menu bar
void SetMenuBar(wxMenuBar *menu_bar); void SetMenuBar(wxMenuBar *menu_bar);

View File

@@ -25,7 +25,7 @@
#include "wx/generic/imaglist.h" #include "wx/generic/imaglist.h"
#ifndef wxUSE_GENERIC_LIST_EXTENSIONS #ifndef wxUSE_GENERIC_LIST_EXTENSIONS
#define wxUSE_GENERIC_LIST_EXTENSIONS 0 #define wxUSE_GENERIC_LIST_EXTENSIONS 1
#endif #endif
// ============================================================================ // ============================================================================

View File

@@ -158,12 +158,12 @@ typedef short INT16;
/* INT32 must hold at least signed 32-bit values. */ /* INT32 must hold at least signed 32-bit values. */
/* Modified JACS 23/4/99. 1200 means VC++ 6 */ /* Modified JACS 23/4/99. 1200 means VC++ 6 */
#if !defined(XMD_H) && !(_MSC_VER >= 1200) /* X11/xmd.h correctly defines INT32 */ #if !defined(XMD_H) && !(_MSC_VER >= 1200) && !(__BORLANDC__ >= 0x550) /* X11/xmd.h correctly defines INT32 */
typedef long INT32; typedef long INT32;
#endif #endif
/* Added JACS 23/4/99, to get INT32 definition */ /* Added JACS 23/4/99, to get INT32 definition */
#if (_MSC_VER >= 1200) #if (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550)
#include <windows.h> #include <windows.h>
#endif #endif

View File

@@ -7,8 +7,9 @@ WXLIBDIR2 = $(WXDIR)\contrib\lib
WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc
WIN95FLAG = -D__WIN95__ -D__WINDOWS__ WIN95FLAG = -D__WIN95__ -D__WINDOWS__
# This should be changed to ilink32 for C++Builder 4 and above # This should be changed to tlink32 if ilink32 is not available
LINK=tlink32 # Available on C++ 5.02 and above
LINK=ilink32
!ifndef FINAL !ifndef FINAL
FINAL=0 FINAL=0

View File

@@ -16,11 +16,11 @@ WXDIR = $(WXWIN)
LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32 LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32
!if "$(FINAL)" == "0" !if "$(FINAL)" == "0"
LINKFLAGS=/v /c /Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib $(EXTRALINKFLAGS) LINKFLAGS=/v /c /Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS)
OPT = -Od OPT = -Od
DEBUG_FLAGS= -v DEBUG_FLAGS= -v
!else !else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib $(EXTRALINKFLAGS) LINKFLAGS=/Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS)
OPT = -Od OPT = -Od
DEBUG_FLAGS = DEBUG_FLAGS =
!endif !endif

View File

@@ -82,7 +82,16 @@ wxImageList::wxImageList()
// Creates an image list // Creates an image list
bool wxImageList::Create(int width, int height, bool mask, int initial) bool wxImageList::Create(int width, int height, bool mask, int initial)
{ {
UINT flags = 0; // TODO shouldallow to specify ILC_COLORxxx here UINT flags = 0;
// set appropriate color depth
int dd = wxDisplayDepth();
if (dd <= 4) flags |= ILC_COLOR; // 16 color
else if (dd <= 8) flags |= ILC_COLOR8; // 256 color
else if (dd <= 16) flags |= ILC_COLOR16; // 64k hi-color
else if (dd <= 24) flags |= ILC_COLOR24; // 16m truecolor
else if (dd <= 32) flags |= ILC_COLOR32; // 16m truecolor
if ( mask ) if ( mask )
flags |= ILC_MASK; flags |= ILC_MASK;