]> git.saurik.com Git - wxWidgets.git/commitdiff
Getting various compilers to work with wxWin again
authorJulian Smart <julian@anthemion.co.uk>
Wed, 9 Jun 1999 18:16:38 +0000 (18:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 9 Jun 1999 18:16:38 +0000 (18:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

28 files changed:
docs/msw/install.txt
include/wx/cmndata.h
include/wx/generic/prntdlgg.h
include/wx/generic/progdlgg.h
include/wx/msw/ole/dataobj.h
include/wx/msw/winundef.h
include/wx/notebook.h
include/wx/wxchar.h
src/common/cmndata.cpp
src/common/memory.cpp
src/generic/dirdlgg.cpp
src/generic/notebook.cpp
src/generic/prntdlgg.cpp
src/generic/statusbr.cpp
src/generic/treectrl.cpp
src/msw/caret.cpp
src/msw/dc.cpp
src/msw/dcclient.cpp
src/msw/dcmemory.cpp
src/msw/dummy.cpp
src/msw/makefile.dos
src/msw/makefile.wat
src/msw/minifram.cpp
src/msw/ole/automtn.cpp
src/msw/textctrl.cpp
src/msw/utils.cpp
src/msw/window.cpp
src/png/makefile.wat

index 98481fb68fa1472adf3665efc4129b627546f090..35c08a0e596c731a0a0206de6507eeb9de2b1b77 100644 (file)
@@ -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.:
index 6c2c6864a1360c83d632eafad669ff523fdbef30..2b298bd01623a93ea6a975d55f799cf538087e1a 100644 (file)
@@ -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();
index 24f69980e5ccc17d26f9215d8f4ee3a9904b26cc..258d2afe20d4aa4a60b02e85ca12134259efb665 100644 (file)
@@ -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
 {
index eaf4cc717722e17f9c705deb64fe8b5b04fd879a..22c1e3b5172bf6e981241c9b4e47fd3e8cc38fc1 100644 (file)
@@ -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);
index 3c12d8ff804e2d6cab1e21c8da8c1beb3a0c3f75..1fcfb1f30f04ea7ec52d51502f51103d7b20167f 100644 (file)
@@ -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;
index 4a56ddeb498bc24f5bf24f78a6e412ea94662b33..ac2fa36577be717723e9cc00be3100735f4ab548 100644 (file)
@@ -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
 
 
 #ifdef StartDoc
    #undef StartDoc
-   #ifdef __MINGW32__
+   #ifdef __GNUWIN32__
       #define DOCINFOW DOCINFO
       #define DOCINFOA DOCINFO
    #endif
 //    #undef GetNextChild
 //endif
 
-#endif // _WX_WINUNDEF_H_
+// #endif // _WX_WINUNDEF_H_
+
index 49c559be4d6c3b07709f595124904f4e396f88c6..04fec2227f057e597897b06cf701ab2c9cc4d407 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------
index 7dcd0e499f6ae16711580c18b1c4db29e769a417..d303b6535f58d0cdef5522132878d8f460be6294 100644 (file)
@@ -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
index 4b9261c7db57ee202590392b5e681c8d89ba7ad1..b9c2c8fc0b2a7f6708d0dd450ee6ce59a03caa1d 100644 (file)
@@ -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
index ac9c0b214361b2dbb8580502cb46e0114a50d434..4b8af7b8764d0d7991c82e380ee09c853eb31d28 100644 (file)
@@ -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
index 023ca20c91a41749ce2a45a6813a8a2584b5a467..ef802459faa9c3a33247bdaa52b1a01c00852d74 100644 (file)
@@ -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"
 
index e33702a3d58ca94912afd616fea9d4dcaa765d3f..3b18a3ce2ac41181f955e6525211b3567787bee6 100644 (file)
@@ -31,7 +31,7 @@
 #include  <wx/log.h>
 #include  <wx/settings.h>
 #include  <wx/generic/imaglist.h>
-#include  <wx/generic/notebook.h>
+#include  <wx/notebook.h>
 #include  <wx/dcclient.h>
 
 // ----------------------------------------------------------------------------
@@ -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;
index 10ab2dcf4828086a7247cb7ce6787ce8ca5f3c56..526a4df7a6a5ce980c90cd26655b9d2ebc35a288 100644 (file)
 // 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
 // ============================================================================
index 683752e0b15970d289ffba2bf8053dae81ce68cf..00940d7e0e7044eb4444d53b8f80c7e8e5370fdb 100644 (file)
 
 #ifdef __WXMSW__
 #include <windows.h>
-
-#ifdef DrawText
-#undef DrawText
-#endif
-
+#include "wx/msw/winundef.h"
 #endif
 
 #if !USE_SHARED_LIBRARY
index ed8e907060729209e5e31ba9f5a96d360c25c216..b3bdc84ab72391745bfdfc2b39fd3693ed400273 100644 (file)
@@ -926,7 +926,7 @@ bool wxTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem
 
     size_t count = children.Count();
     for (size_t n=(size_t)(index+1); n<count; ++n)
-      if (TagAllChildrenUntilLast(children[n], last_item, select)) return true;
+      if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE;
 
     return TagNextChildren(parent, last_item, select);
 }
@@ -936,17 +936,17 @@ bool wxTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericT
   crt_item->SetHilight(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)
index 08bc7e5389bf713e2676f383cd21ef430d82656d..17ef55cb21ed0796b09ae779e72b377e5ba1c7ed 100644 (file)
@@ -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)
 }
index c3fb342e0112547e054303f9495ed85a93960a4b..a7b088cb0e630c4f42b12766eea485f893e8104c 100644 (file)
@@ -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);
index 9a347c6911a99355cc9b3ae8506ebe998f95c988..bbffc5a65a398b2d31f9ed64843b716f3cc5a14a 100644 (file)
@@ -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__
 
 // ===========================================================================
index 60bbb50735c0f9ddee71baed659b8da2870ad71b..7e171ac46ce65b4dba4ed755cb341f731d1e59b4 100644 (file)
@@ -27,6 +27,7 @@
 #include "wx/dcmemory.h"
 
 #include <windows.h>
+#include "wx/msw/winundef.h"
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
index 4b5d3141e873ee9af2452fe6b848ac19330445aa..c21e7df120e3214f608cf6f723e02d867aa5e2ff 100644 (file)
  * 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__
index fbcde4675ff18984e3a8a6f1f26b35cd3c8a642b..4048a14e96b55a84649f1a9505147bc721c5ab75 100644 (file)
@@ -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)
index c77adfa14fe706029f5184aab7682b396e585e9a..5ded0306717fa562c8572ddbeca4fd01dbc482d7 100644 (file)
@@ -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) $<
 
index 83f8fa9558e8a5ccc41a5f481f0f5089d0cefa8d..67c1df931a3e989a54b1984f19468be4fe86c395 100644 (file)
@@ -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
         }
     }
     
index 8a8babc89a9de065bea0cfafe4e2722438ca7a75..934efa6354255768f3447bd8f117f4ab6f6241a9 100644 (file)
@@ -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
index f6a224a163ad7f56f543d9828a5e3494e7ab696f..6e3d88dc59b5cd7d1c89a84843c2d1ed332cb5dc 100644 (file)
@@ -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?
index f41729be610f426be21da2d53bd3602c487275c8..c9c1d5b68a25991c22dbae05d7d7735386f18994 100644 (file)
@@ -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
index 95424f3bc6acfbf72e7ef6845c9607be096c52b7..48ccd27be19efc14ca63f1304be0a6eb71c3392f 100644 (file)
@@ -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:
index f3bc79b5847594d1d30839f58a02bad145c1c74f..c6c6c8ae483126cf0b23fb29190387d869aa05ef 100644 (file)
@@ -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) $<
-
-