From 25889d3c43f537fea00a2b7d6df7bd7e63e113f8 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 9 Jun 1999 18:16:38 +0000 Subject: [PATCH] Getting various compilers to work with wxWin again git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/msw/install.txt | 3 ++- include/wx/cmndata.h | 2 +- include/wx/generic/prntdlgg.h | 3 +++ include/wx/generic/progdlgg.h | 2 +- include/wx/msw/ole/dataobj.h | 6 ++--- include/wx/msw/winundef.h | 9 +++++-- include/wx/notebook.h | 24 +++++++++++++++++ include/wx/wxchar.h | 49 ++++++++++++++++++++++++++++++++++- src/common/cmndata.cpp | 12 ++++++--- src/common/memory.cpp | 8 ++++++ src/generic/dirdlgg.cpp | 1 + src/generic/notebook.cpp | 6 ++--- src/generic/prntdlgg.cpp | 9 +++++-- src/generic/statusbr.cpp | 6 +---- src/generic/treectrl.cpp | 14 +++++----- src/msw/caret.cpp | 25 ++++++++++++++++++ src/msw/dc.cpp | 2 +- src/msw/dcclient.cpp | 2 +- src/msw/dcmemory.cpp | 1 + src/msw/dummy.cpp | 8 ------ src/msw/makefile.dos | 6 +++++ src/msw/makefile.wat | 8 ++++-- src/msw/minifram.cpp | 4 +++ src/msw/ole/automtn.cpp | 4 +++ src/msw/textctrl.cpp | 2 ++ src/msw/utils.cpp | 6 ++--- src/msw/window.cpp | 4 +-- src/png/makefile.wat | 5 +--- 28 files changed, 180 insertions(+), 51 deletions(-) diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 98481fb68f..35c08a0e59 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -316,7 +316,8 @@ Here are the steps required: socket-related files in src/msw/makefile.g95. - Set your WXWIN variable to where wxWindows is installed. - For Cygwin/Mingw32, use forward slashes in the path, not backslashes. + *** IMPORTANT: For Cygwin/Mingw32, use forward slashes in the path, not + backslashes. - Use the makefile.g95 files for compiling wxWindows and samples, e.g.: diff --git a/include/wx/cmndata.h b/include/wx/cmndata.h index 6c2c6864a1..2b298bd016 100644 --- a/include/wx/cmndata.h +++ b/include/wx/cmndata.h @@ -158,7 +158,7 @@ class WXDLLEXPORT wxPrintData: public wxObject void operator=(const wxPrintSetupData& setupData); #endif -#ifdef __WXMSW__ +#if defined(__WXMSW__) // Convert to/from the DEVMODE structure void ConvertToNative(); void ConvertFromNative(); diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index 24f69980e5..258d2afe20 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -72,6 +72,7 @@ enum // Windows using PostScript print/preview) // ---------------------------------------------------------------------------- +#if wxUSE_POSTSCRIPT class WXDLLEXPORT wxGenericPrintDialog : public wxDialog { DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog) @@ -150,6 +151,8 @@ public: wxPrintData& GetPrintData() { return m_printData; } #endif // wxUSE_POSTSCRIPT }; +#endif + // wxUSE_POSTSCRIPT class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog { diff --git a/include/wx/generic/progdlgg.h b/include/wx/generic/progdlgg.h index eaf4cc7177..22c1e3b517 100644 --- a/include/wx/generic/progdlgg.h +++ b/include/wx/generic/progdlgg.h @@ -59,7 +59,7 @@ public: void Resume() { m_state = Continue; } /// Callback for optional abort button - void OnCancel(wxEvent& WXUNUSED(event)) { m_state = Canceled; } + void OnCancel(wxCommandEvent& WXUNUSED(event)) { m_state = Canceled; } /// callback to disable "hard" window closing void OnClose(wxCloseEvent& event); diff --git a/include/wx/msw/ole/dataobj.h b/include/wx/msw/ole/dataobj.h index 3c12d8ff80..1fcfb1f30f 100644 --- a/include/wx/msw/ole/dataobj.h +++ b/include/wx/msw/ole/dataobj.h @@ -33,7 +33,7 @@ public: // ctor & dtor wxDataObject(); - ~wxDataObject(); + virtual ~wxDataObject(); // pure virtuals to override // get the best suited format for our data @@ -114,9 +114,9 @@ public: virtual bool IsSupportedFormat(wxDataFormat format) const { return format == wxDF_BITMAP; } virtual size_t GetDataSize() const - { wxASSERT(false); return 0; } // BEMIMP + { wxASSERT(FALSE); return 0; } // BEMIMP virtual void GetDataHere(void *pBuf) const - { wxASSERT(false); } // BEMIMP + { wxASSERT(FALSE); } // BEMIMP private: wxBitmap m_bitmap; diff --git a/include/wx/msw/winundef.h b/include/wx/msw/winundef.h index 4a56ddeb49..ac2fa36577 100644 --- a/include/wx/msw/winundef.h +++ b/include/wx/msw/winundef.h @@ -9,8 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +/* THIS SHOULD NOT BE USED since you might include it once e.g. in window.h, + * then again _AFTER_ you've included windows.h, in which case it won't work + * a 2nd time -- JACS #ifndef _WX_WINUNDEF_H_ #define _WX_WINUNDEF_H_ + */ // windows.h #defines the following identifiers which are also used in wxWin @@ -117,7 +121,7 @@ #ifdef StartDoc #undef StartDoc - #ifdef __MINGW32__ + #ifdef __GNUWIN32__ #define DOCINFOW DOCINFO #define DOCINFOA DOCINFO #endif @@ -196,4 +200,5 @@ // #undef GetNextChild //endif -#endif // _WX_WINUNDEF_H_ +// #endif // _WX_WINUNDEF_H_ + diff --git a/include/wx/notebook.h b/include/wx/notebook.h index 49c559be4d..04fec2227f 100644 --- a/include/wx/notebook.h +++ b/include/wx/notebook.h @@ -43,6 +43,28 @@ private: typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); +// Truncation in 16-bit BC++ means we need to define these differently +#if defined(__BORLANDC__) && defined(__WIN16__) +#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ + { \ + wxEVT_COMMAND_NB_PAGE_CHANGED, \ + id, \ + -1, \ + (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ + NULL \ + }, + +#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ + { \ + wxEVT_COMMAND_NB_PAGE_CHANGING, \ + id, \ + -1, \ + (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ + NULL \ + }, + +#else + #define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ { \ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ @@ -61,6 +83,8 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); NULL \ }, +#endif + // ---------------------------------------------------------------------------- // wxNotebook class itself // ---------------------------------------------------------------------------- diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 7dcd0e499f..d303b6535f 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -195,6 +195,10 @@ typedef _TUCHAR wxUChar; #endif #elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h #define wxUSE_WCHAR_T 0 + #elif defined(__BORLANDC__) // WIN16 BC++ + #define wxUSE_WCHAR_T 0 + #elif defined(__WATCOMC__) + #define wxUSE_WCHAR_T 0 #else // add additional compiler checks if this fails #define wxUSE_WCHAR_T 1 @@ -319,7 +323,50 @@ typedef unsigned char wxUChar; #define wxSetlocale setlocale // string.h functions -#define wxStricmp strcasecmp +// #define wxStricmp strcasecmp + +// Taken from string.h since it tests for platform more correctly +// portable strcasecmp/_stricmp +inline int WXDLLEXPORT wxStricmp(const char *psz1, const char *psz2) +{ +#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined(__INTEL__) ) + return _stricmp(psz1, psz2); +#elif defined(__SC__) + return _stricmp(psz1, psz2); +#elif defined(__SALFORDC__) + return stricmp(psz1, psz2); +#elif defined(__BORLANDC__) + return stricmp(psz1, psz2); +#elif defined(__WATCOMC__) + return stricmp(psz1, psz2); +#elif defined(__UNIX__) || defined(__GNUWIN32__) + return strcasecmp(psz1, psz2); +#elif defined(__MWERKS__) && !defined(__INTEL__) + register char c1, c2; + do { + c1 = tolower(*psz1++); + c2 = tolower(*psz2++); + } while ( c1 && (c1 == c2) ); + + return c1 - c2; +#else + // almost all compilers/libraries provide this function (unfortunately under + // different names), that's why we don't implement our own which will surely + // be more efficient than this code (uncomment to use): + /* + register char c1, c2; + do { + c1 = tolower(*psz1++); + c2 = tolower(*psz2++); + } while ( c1 && (c1 == c2) ); + + return c1 - c2; + */ + + #error "Please define string case-insensitive compare for your OS/compiler" +#endif // OS/compiler +} + // #define wxStrtok strtok_r // this needs a configure check // leave the rest to defaults below diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 4b9261c7db..b9c2c8fc0b 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -225,8 +225,9 @@ wxPrintData::~wxPrintData() #endif } -#if defined(__WXMSW__) && defined(__WIN32__) +#if defined(__WXMSW__) // && defined(__WIN32__) +#ifdef __WIN32__ static wxString wxGetPrintDlgError() { DWORD err = CommDlgExtendedError(); @@ -259,8 +260,7 @@ static wxString wxGetPrintDlgError() } return msg; } - - +#endif void wxPrintData::ConvertToNative() { @@ -331,8 +331,10 @@ void wxPrintData::ConvertToNative() //// Collation +#ifndef __WIN16__ devMode->dmCollate = (m_printCollate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE); devMode->dmFields |= DM_COLLATE; +#endif //// Number of copies @@ -451,6 +453,7 @@ void wxPrintData::ConvertFromNative() //// Collation +#ifndef __WIN16__ if (devMode->dmFields & DM_COLLATE) { if (devMode->dmCollate == DMCOLLATE_TRUE) @@ -458,6 +461,7 @@ void wxPrintData::ConvertFromNative() else m_printCollate = FALSE; } +#endif //// Number of copies @@ -734,8 +738,8 @@ void wxPrintDialogData::ConvertToNative() #ifdef __GNUWIN32__ pd->lStructSize = 66 ; #else -#endif pd->lStructSize = sizeof(PRINTDLG); +#endif pd->hwndOwner = (HWND)NULL; pd->hDevMode = NULL; // Will be created by PrintDlg pd->hDevNames = NULL; // Ditto diff --git a/src/common/memory.cpp b/src/common/memory.cpp index ac9c0b2143..4b8af7b876 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -1146,7 +1146,11 @@ void wxTrace(const wxChar *fmt ...) } else #ifdef __WXMSW__ +#ifdef __WIN32__ OutputDebugString((LPCTSTR)buffer) ; +#else + OutputDebugString((const char*) buffer) ; +#endif #else fprintf(stderr, buffer); #endif @@ -1178,7 +1182,11 @@ void wxTraceLevel(int level, const wxChar *fmt ...) } else #ifdef __WXMSW__ +#ifdef __WIN32__ OutputDebugString((LPCTSTR)buffer) ; +#else + OutputDebugString((const char*) buffer) ; +#endif #else fprintf(stderr, buffer); #endif diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index 023ca20c91..ef802459fa 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -31,6 +31,7 @@ #include "wx/gdicmn.h" #include "wx/intl.h" #include "wx/imaglist.h" +#include "wx/icon.h" #include "wx/generic/dirdlgg.h" diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index e33702a3d5..3b18a3ce2a 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include // ---------------------------------------------------------------------------- @@ -479,7 +479,7 @@ bool wxNotebook::RefreshLayout(bool force) m_tabView->SetViewRect(rect); - m_tabView->Layout(); + m_tabView->LayoutTabs(); // Need to do it a 2nd time to get the tab height with // the new view width, since changing the view width changes the @@ -492,7 +492,7 @@ bool wxNotebook::RefreshLayout(bool force) m_tabView->SetViewRect(rect); - m_tabView->Layout(); + m_tabView->LayoutTabs(); if (!force && (rect == oldRect)) return FALSE; diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 10ab2dcf48..526a4df7a6 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -65,18 +65,21 @@ // wxWin macros // ---------------------------------------------------------------------------- +#if !USE_SHARED_LIBRARY + #if wxUSE_POSTSCRIPT -#if !USE_SHARED_LIBRARY IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) - IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog) BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) END_EVENT_TABLE() +#endif + + IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog) BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog) EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter) @@ -89,6 +92,8 @@ extern wxPrintPaperDatabase *wxThePrintPaperDatabase; +#if wxUSE_POSTSCRIPT + // ============================================================================ // implementation // ============================================================================ diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 683752e0b1..00940d7e0e 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -31,11 +31,7 @@ #ifdef __WXMSW__ #include - -#ifdef DrawText -#undef DrawText -#endif - +#include "wx/msw/winundef.h" #endif #if !USE_SHARED_LIBRARY diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index ed8e907060..b3bdc84ab7 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -926,7 +926,7 @@ bool wxTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem size_t count = children.Count(); for (size_t n=(size_t)(index+1); nSetHilight(select); RefreshLine(crt_item); - if (crt_item==last_item) return true; + if (crt_item==last_item) return TRUE; if (crt_item->HasChildren()) { wxArrayTreeItems& children = crt_item->GetChildren(); size_t count = children.Count(); for ( size_t n = 0; n < count; ++n ) - if (TagAllChildrenUntilLast(children[n], last_item, select)) return true; + if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE; } - return false; + return FALSE; } void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *item2) @@ -988,8 +988,8 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId, // to keep going anyhow !!! if (is_single) { - unselect_others=true; - extended_select=false; + unselect_others=TRUE; + extended_select=FALSE; } wxGenericTreeItem *item = itemId.m_pItem; @@ -1029,7 +1029,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId, } else { - bool select=true; // the default + bool select=TRUE; // the default // Check if we need to toggle hilight (ctrl mode) if (!unselect_others) diff --git a/src/msw/caret.cpp b/src/msw/caret.cpp index 08bc7e5389..17ef55cb21 100644 --- a/src/msw/caret.cpp +++ b/src/msw/caret.cpp @@ -60,10 +60,14 @@ int wxCaretBase::GetBlinkTime() //static void wxCaretBase::SetBlinkTime(int milliseconds) { +#ifdef __WIN16__ + ::SetCaretBlinkTime(milliseconds) ; +#else if ( !::SetCaretBlinkTime(milliseconds) ) { wxLogLastError("SetCaretBlinkTime"); } +#endif } // --------------------------------------------------------------------------- @@ -77,6 +81,10 @@ bool wxCaret::MSWCreateCaret() if ( !m_hasCaret ) { +#ifdef __WIN16__ + ::CreateCaret(GetWinHwnd(GetWindow()), 0, m_width, m_height) ; + m_hasCaret = TRUE; +#else if ( !::CreateCaret(GetWinHwnd(GetWindow()), 0, m_width, m_height) ) { wxLogLastError("CreateCaret"); @@ -85,6 +93,7 @@ bool wxCaret::MSWCreateCaret() { m_hasCaret = TRUE; } +#endif } return m_hasCaret; @@ -112,10 +121,14 @@ void wxCaret::OnKillFocus() { m_hasCaret = FALSE; +#ifdef __WIN16__ + ::DestroyCaret() ; +#else if ( !::DestroyCaret() ) { wxLogLastError("DestroyCaret"); } +#endif } } @@ -133,20 +146,28 @@ void wxCaret::DoShow() (void)MSWCreateCaret(); } +#ifdef __WIN16__ + ::ShowCaret(GetWinHwnd(GetWindow())) ; +#else if ( !::ShowCaret(GetWinHwnd(GetWindow())) ) { wxLogLastError("ShowCaret"); } +#endif } void wxCaret::DoHide() { if ( m_hasCaret ) { +#ifdef __WIN16__ + ::HideCaret(GetWinHwnd(GetWindow())) ; +#else if ( !::HideCaret(GetWinHwnd(GetWindow())) ) { wxLogLastError("HideCaret"); } +#endif } } @@ -158,10 +179,14 @@ void wxCaret::DoMove() { if ( m_hasCaret ) { +#ifdef __WIN16__ + ::SetCaretPos(m_x, m_y) ; +#else if ( !::SetCaretPos(m_x, m_y) ) { wxLogLastError("SetCaretPos"); } +#endif } //else: we don't have caret right now, nothing to do (this does happen) } diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index c3fb342e01..a7b088cb0e 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -559,7 +559,7 @@ void wxDC::DoDrawRoundedRectangle(long x, long y, long width, long height, doubl long y2 = (y+height); (void)RoundRect(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), - YLOG2DEV(y2), 2*XLOG2DEV(radius), 2*YLOG2DEV(radius)); + YLOG2DEV(y2), (int) (2*XLOG2DEV(radius)), (int)( 2*YLOG2DEV(radius))); CalcBoundingBox(x, y); CalcBoundingBox(x2, y2); diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 9a347c6911..bbffc5a65a 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -79,7 +79,7 @@ static PAINTSTRUCT g_paintStruct; // created in resopnse to WM_PAINT message - doing this from elsewhere is a // common programming error among wxWindows programmers and might lead to // very subtle and difficult to debug refresh/repaint bugs. - extern bool g_isPainting = FALSE; + bool g_isPainting = FALSE; #endif // __WXDEBUG__ // =========================================================================== diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 60bbb50735..7e171ac46c 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -27,6 +27,7 @@ #include "wx/dcmemory.h" #include +#include "wx/msw/winundef.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) diff --git a/src/msw/dummy.cpp b/src/msw/dummy.cpp index 4b5d3141e8..c21e7df120 100644 --- a/src/msw/dummy.cpp +++ b/src/msw/dummy.cpp @@ -20,14 +20,6 @@ * This will produce a big PCH file. */ -#if defined(__BORLANDC__) -#if !(defined(__WIN32__) || defined(__NT__) || defined(__WIN32__)) -#pragma hdrfile "c:\wx\src\msw\wx.pch" -#endif - -#pragma hdrstart -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index fbcde4675f..4048a14e96 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -84,6 +84,7 @@ GENERICOBJS= \ COMMONOBJS = \ $(COMMDIR)\config.obj \ $(COMMDIR)\cmndata.obj \ + $(COMMDIR)\dcbase.obj \ $(COMMDIR)\docview.obj \ $(COMMDIR)\docmdi.obj \ $(COMMDIR)\dynarray.obj \ @@ -702,6 +703,11 @@ $(COMMDIR)/cmndata.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(COMMDIR)/dcbase.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(COMMDIR)/docview.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index c77adfa14f..5ded030671 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -65,7 +65,6 @@ COMMONOBJS = cmndata.obj & gdicmn.obj & image.obj & imagpng.obj & - imagjpeg.obj & intl.obj & ipcbase.obj & helpbase.obj & @@ -95,6 +94,7 @@ COMMONOBJS = cmndata.obj & sckfile.obj & sckipc.obj & sckstrm.obj & + sckint.obj & url.obj & http.obj & protocol.obj & @@ -115,6 +115,7 @@ COMMONOBJS = cmndata.obj & wxchar.obj # Can't compile these yet under Watcom C++ +# imagjpeg.obj & # odbc.obj & # db.obj & # dbtable.obj & @@ -569,7 +570,7 @@ image.obj: $(COMMDIR)\image.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< imagpng.obj: $(COMMDIR)\imagpng.cpp - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + *$(CCC) $(CPPFLAGS) -i=..\png -i=..\zlib $(IFLAGS) $< imagjpeg.obj: $(COMMDIR)\imagjpeg.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -655,6 +656,9 @@ string.obj: $(COMMDIR)\string.cpp socket.obj: $(COMMDIR)\socket.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +sckint.obj: $(COMMDIR)\sckint.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + sckaddr.obj: $(COMMDIR)\sckaddr.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp index 83f8fa9558..67c1df931a 100644 --- a/src/msw/minifram.cpp +++ b/src/msw/minifram.cpp @@ -967,7 +967,11 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc, rgbText = SetTextColor( hDC, rgbText ) ; SetBkMode( hDC, nBkMode ) ; +#ifdef __WIN16__ + GlobalFreePtr( (unsigned int) lpsz ) ; +#else GlobalFreePtr( lpsz ) ; +#endif } } diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 8a8babc89a..934efa6354 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -668,7 +668,11 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) case VT_BOOL: { #if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) //GC +#ifndef HAVE_BOOL // Can't use bool operator if no native bool type + variant = (long) (oleVariant.bool != 0); +#else variant = (bool) (oleVariant.bool != 0); +#endif #else variant = (bool) (oleVariant.boolVal != 0); #endif diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index f6a224a163..6e3d88dc59 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1183,6 +1183,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) void wxTextCtrl::AdjustSpaceLimit() { +#ifndef __WIN16__ unsigned int len = ::GetWindowTextLength(GetHwnd()), limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0); if ( len > limit ) @@ -1198,6 +1199,7 @@ void wxTextCtrl::AdjustSpaceLimit() else ::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0); } +#endif } // For Rich Edit controls. Do we need it? diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index f41729be61..c9c1d5b68a 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -534,11 +534,11 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c #endif // wxUSE_RESOURCES // --------------------------------------------------------------------------- -// helper functiosn for showing a "busy" cursor +// helper functions for showing a "busy" cursor // --------------------------------------------------------------------------- -extern HCURSOR gs_wxBusyCursor = 0; // new, busy cursor -static HCURSOR gs_wxBusyCursorOld = 0; // old cursor +HCURSOR gs_wxBusyCursor = 0; // new, busy cursor +HCURSOR gs_wxBusyCursorOld = 0; // old cursor static int gs_wxBusyCursorCount = 0; // Set the cursor to the busy cursor for all windows diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 95424f3bc6..48ccd27be1 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1561,7 +1561,7 @@ void wxWindow::UnpackScroll(WXWPARAM wParam, WXLPARAM lParam, void wxWindow::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam, WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd) { - *control = (WXHWND)LOWORD(lParam); + *hwnd = (WXHWND)LOWORD(lParam); *nCtlColor = (int)HIWORD(lParam); *hdc = (WXHDC)wParam; } @@ -1945,7 +1945,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) break; case WM_GETMINMAXINFO: - processed = HandleGetMinMaxInfo((LPMINMAXINFO)lParam); + processed = HandleGetMinMaxInfo((MINMAXINFO*)lParam); break; case WM_SETCURSOR: diff --git a/src/png/makefile.wat b/src/png/makefile.wat index f3bc79b584..c6c6c8ae48 100644 --- a/src/png/makefile.wat +++ b/src/png/makefile.wat @@ -7,6 +7,7 @@ # Makefile : Builds PNG library for Watcom C++, WIN32 WXDIR = ..\.. +EXTRACPPFLAGS=-i=..\zlib !include $(WXDIR)\src\makewat.env @@ -34,7 +35,3 @@ clean: .SYMBOLIC cleanall: clean -#accel.obj: $(MSWDIR)\accel.cpp -# *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - - -- 2.47.2