From 5dd26b083956439f0147c134e9365c222fba3726 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sat, 15 Jan 2000 10:20:46 +0000 Subject: [PATCH] 16-bit fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tmake/filelist.txt | 2 +- include/wx/event.h | 1 - include/wx/spinctrl.h | 3 +++ src/generic/listctrl.cpp | 5 +++++ src/generic/numdlgg.cpp | 2 ++ src/msw/clipbrd.cpp | 4 ++-- src/msw/makefile.dos | 8 +++++++- src/msw/radiobox.cpp | 2 ++ 8 files changed, 22 insertions(+), 5 deletions(-) diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index af41b40f68..77fb7c49aa 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -153,7 +153,7 @@ layout.cpp C lboxcmn.cpp C list.cpp C B log.cpp C B -longlong.cpp C 32,B +longlong.cpp C B memory.cpp C menucmn.cpp C mimetype.cpp C 32,B diff --git a/include/wx/event.h b/include/wx/event.h index 1d97b842f8..83d7212b5f 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1662,7 +1662,6 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ #define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, #define EVT_TOOL_ENTER(id, fn) { wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, #define EVT_CHECKLISTBOX(id, fn) { wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_SPINCTRL(id, fn) { wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, // Generic command events #define EVT_COMMAND_LEFT_CLICK(id, fn) { wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, diff --git a/include/wx/spinctrl.h b/include/wx/spinctrl.h index afa83467f3..9d6cd5c3e5 100644 --- a/include/wx/spinctrl.h +++ b/include/wx/spinctrl.h @@ -60,5 +60,8 @@ protected: #include "wx/generic/spinctlg.h" #endif // platform +// Macro must be defined here, not event.h, since it must reference wxSpinEventFunction +#define EVT_SPINCTRL(id, fn) { wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & fn, (wxObject *) NULL }, + #endif // _WX_SPINCTRL_H_ diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 43b025202c..95bad0445e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -314,8 +314,13 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) m_bound_all.height = lh; if (item->HasImage()) { +#ifdef __WIN16__ + int w = 0; + int h = 0; +#else wxCoord w = 0; wxCoord h = 0; +#endif m_owner->GetImageSize( item->GetImage(), w, h ); m_bound_all.width += 4 + w; if (h > m_bound_all.height) m_bound_all.height = h; diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp index 22455856f9..d40d36daad 100644 --- a/src/generic/numdlgg.cpp +++ b/src/generic/numdlgg.cpp @@ -129,7 +129,9 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, wxString valStr; valStr.Printf(wxT("%lu"), m_value); m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) ); +#ifndef __WIN16__ m_spinctrl->SetRange((int)m_min, (int)m_max); +#endif inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); // add both topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 ); diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 1166f73e33..37f71481b5 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -159,7 +159,7 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat) case CF_BITMAP: return ::IsClipboardFormatAvailable(CF_DIB) != 0; -#if wxUSE_ENH_METAFILE +#if wxUSE_ENH_METAFILE && !defined(__WIN16__) case CF_METAFILEPICT: return ::IsClipboardFormatAvailable(CF_ENHMETAFILE) != 0; #endif // wxUSE_ENH_METAFILE @@ -247,7 +247,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat, } #endif // wxUSE_METAFILE -#if wxUSE_ENH_METAFILE +#if wxUSE_ENH_METAFILE && !defined(__WIN16__) case wxDF_ENHMETAFILE: { wxEnhMetaFile *emf = (wxEnhMetaFile *)data; diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index c88274dc83..388cadba29 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 00:09, 2000/01/14 +# This file was automatically generated by tmake at 18:22, 2000/01/14 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T! # @@ -133,6 +133,7 @@ COMMONOBJS1 = \ $(COMMDIR)\lboxcmn.obj \ $(COMMDIR)\list.obj \ $(COMMDIR)\log.obj \ + $(COMMDIR)\longlong.obj \ $(COMMDIR)\memory.obj \ $(COMMDIR)\menucmn.obj \ $(COMMDIR)\module.obj \ @@ -952,6 +953,11 @@ $(COMMDIR)/log.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(COMMDIR)/longlong.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(COMMDIR)/memory.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 857106acb0..a7e5101893 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -713,6 +713,7 @@ long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { switch ( nMsg ) { +#ifndef __WIN16__ case WM_CTLCOLORSTATIC: // set the colour of the radio buttons to be the same as ours { @@ -726,6 +727,7 @@ long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) return (WXHBRUSH)brush->GetResourceHandle(); } +#endif // This is required for the radiobox to be sensitive to mouse input, // e.g. for Dialog Editor. -- 2.45.2