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
void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR
void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR
- virtual bool Show(bool show);
+ virtual bool Show(bool show = TRUE);
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR
void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR
- virtual bool Show(bool show);
+ virtual bool Show(bool show = TRUE);
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle() const { return m_title; }
+ virtual bool Show(bool show = TRUE);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
#include "wx/generic/imaglist.h"
#ifndef wxUSE_GENERIC_LIST_EXTENSIONS
#include "wx/generic/imaglist.h"
#ifndef wxUSE_GENERIC_LIST_EXTENSIONS
-#define wxUSE_GENERIC_LIST_EXTENSIONS 0
+#define wxUSE_GENERIC_LIST_EXTENSIONS 1
#endif
// ============================================================================
#endif
// ============================================================================
/* INT32 must hold at least signed 32-bit values. */
/* Modified JACS 23/4/99. 1200 means VC++ 6 */
/* INT32 must hold at least signed 32-bit values. */
/* 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;
#endif
/* Added JACS 23/4/99, to get INT32 definition */
typedef long INT32;
#endif
/* Added JACS 23/4/99, to get INT32 definition */
+#if (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550)
#include <windows.h>
#endif
#include <windows.h>
#endif
WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc
WIN95FLAG = -D__WIN95__ -D__WINDOWS__
WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc
WIN95FLAG = -D__WIN95__ -D__WINDOWS__
-# This should be changed to ilink32 for C++Builder 4 and above
-LINK=tlink32
+# This should be changed to tlink32 if ilink32 is not available
+# Available on C++ 5.02 and above
+LINK=ilink32
LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32
!if "$(FINAL)" == "0"
LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32
!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
DEBUG_FLAGS= -v
!else
OPT = -Od
DEBUG_FLAGS= -v
!else
-LINKFLAGS=/Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib $(EXTRALINKFLAGS)
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS)
OPT = -Od
DEBUG_FLAGS =
!endif
OPT = -Od
DEBUG_FLAGS =
!endif
// Creates an image list
bool wxImageList::Create(int width, int height, bool mask, int initial)
{
// Creates an image list
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 )
flags |= ILC_MASK;
if ( mask )
flags |= ILC_MASK;