From 0a240683ed2ed0ad7efe733d451dd36740607605 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Sun, 31 Jan 1999 13:58:17 +0000
Subject: [PATCH] Various small fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 distrib/msw/cw.rsp                   |   2 ++
 docs/msw/install.txt                 |   7 +++++++
 docs/msw/todo.txt                    |  16 ++--------------
 include/wx/confbase.h                |   6 +++---
 include/wx/filefn.h                  |   4 ++--
 include/wx/generic/listctrl.h        |  20 ++++++++++----------
 include/wx/msw/setup.h               |   7 +++++++
 samples/config/conftest.def          |   7 +++++++
 samples/treectrl/bitmaps/file1.ico   | Bin 1078 -> 318 bytes
 samples/treectrl/bitmaps/folder1.ico | Bin 1078 -> 318 bytes
 samples/treectrl/treetest.cpp        |   2 +-
 src/common/file.cpp                  |   2 +-
 src/generic/listctrl.cpp             |  16 ++++++++--------
 src/generic/prop.cpp                 |   6 +++---
 src/generic/treectrl.cpp             |   2 +-
 src/make_cw.mcp                      | Bin 238664 -> 229358 bytes
 src/makeprog.bcc                     |   4 ++--
 src/makewat.env                      |   5 +++--
 src/msw/iniconf.cpp                  |   2 +-
 src/msw/makefile.bcc                 |   7 ++-----
 src/msw/makefile.g95                 |   2 --
 src/msw/makefile.sl                  |   3 ---
 src/msw/makefile.vc                  |   8 +-------
 src/msw/makefile.wat                 |   5 +----
 src/xpm/xpm34.h                      |   2 +-
 25 files changed, 65 insertions(+), 70 deletions(-)
 create mode 100644 samples/config/conftest.def

diff --git a/distrib/msw/cw.rsp b/distrib/msw/cw.rsp
index d032bd9478..0b552666ae 100644
--- a/distrib/msw/cw.rsp
+++ b/distrib/msw/cw.rsp
@@ -5,6 +5,8 @@ include/wx_cw.pch
 include/wx_cw.pch++
 include/wx_cw_d.pch
 include/wx_cw_d.pch++
+include/wx_x86++_d.mch
+include/wx_x86_d.mch
 
 samples/bombs/make_cw.mcp
 
diff --git a/docs/msw/install.txt b/docs/msw/install.txt
index 6cb0f70a7a..78b70e8193 100644
--- a/docs/msw/install.txt
+++ b/docs/msw/install.txt
@@ -137,6 +137,13 @@ Metrowerks CodeWarrior compilation
    Further project files for samples will be available in due
    course.
 
+NOTES:
+
+(a) Unfortunately CodeWarrior support is broken in this
+release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
+(b) You need CodeWarrior Pro 4 plus the patches to 4.1 from the
+Metrowerks Web site.
+
 Symantec C++ compilation
 ------------------------
 
diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt
index 3ace16d97d..0fa40eff7d 100644
--- a/docs/msw/todo.txt
+++ b/docs/msw/todo.txt
@@ -33,19 +33,9 @@ e.g. ',' instead of '.' for decimal points.
 
 Supply correct ctl3d/odbc lib files for BC++, Watcom (corrupt?)
 
-16-bit compilation: replace small icons in treectrl/listctrl
-samples that also have a 32x32 icon, with icons with only one
-image, using Borland Image Editor. WIN16 doesn't have a function
-for specifying which image to use, so the larger one gets used
-erroneously.
+Implement new wxClipboard and DnD (Vadim)
 
-Add headers to VC++ project files.
-
-Implement Robert's wxClipboard.
-
-Distribution naming?
-
-wxToolTip
+Implement wxToolTip
 
 LOW PRIORITY (MEDIUM TERM)
 --------------------------
@@ -97,8 +87,6 @@ Miscellaneous file/system function wrappers.
 
 Bug database.
 
-OpenGL integration: check that wxGLCanvas works cross-platform.
-
 Menu bitmaps - document Vadim's enhancements.
 
 wxCreateDynamicObject is apparently slow: ~ 2000 calls to strcmp. Need to
diff --git a/include/wx/confbase.h b/include/wx/confbase.h
index 2fcb50efee..edbe8ca2ca 100644
--- a/include/wx/confbase.h
+++ b/include/wx/confbase.h
@@ -109,8 +109,8 @@ public:
   // Not all args will always be used by derived classes, but
   // including them all in each class ensures compatibility.
   // If appName is empty, uses wxApp name
-  wxConfigBase(const wxString& appName = "", const wxString& vendorName = "",
-               const wxString& localFilename = "", const wxString& globalFilename = "",
+  wxConfigBase(const wxString& appName = wxEmptyString, const wxString& vendorName = wxEmptyString,
+               const wxString& localFilename = wxEmptyString, const wxString& globalFilename = wxEmptyString,
                long style = 0);
 
     // empty but ensures that dtor of all derived classes is virtual
@@ -152,7 +152,7 @@ public:
   virtual bool Read(const wxString& key, wxString *pStr) const = 0;
   virtual bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
 
-  virtual wxString Read(const wxString& key, const wxString& defVal = "") const;
+  virtual wxString Read(const wxString& key, const wxString& defVal = wxEmptyString) const;
 
   virtual bool Read(const wxString& key, long *pl) const = 0;
   virtual bool Read(const wxString& key, long *pl, long defVal) const;
diff --git a/include/wx/filefn.h b/include/wx/filefn.h
index 3127f1c51e..3c78364288 100644
--- a/include/wx/filefn.h
+++ b/include/wx/filefn.h
@@ -104,8 +104,8 @@ WXDLLEXPORT char* wxExpandPath(char *dest, const char *path);
 // and make (if under the home tree) relative to home
 // [caller must copy-- volatile]
 WXDLLEXPORT char* wxContractPath(const wxString& filename,
-                                 const wxString& envname = "",
-                                 const wxString& user = "");
+                                 const wxString& envname = wxEmptyString,
+                                 const wxString& user = wxEmptyString);
 
 // Destructive removal of /./ and /../ stuff
 WXDLLEXPORT char* wxRealPath(char *path);
diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h
index 810d91f9a6..697ce88046 100644
--- a/include/wx/generic/listctrl.h
+++ b/include/wx/generic/listctrl.h
@@ -314,10 +314,10 @@ class WXDLLEXPORT wxListLineData : public wxObject
 
   public:
     wxList              m_items;
-    wxRectangle         m_bound_all;
-    wxRectangle         m_bound_label;
-    wxRectangle         m_bound_icon;
-    wxRectangle         m_bound_hilight;
+    wxRect         m_bound_all;
+    wxRect         m_bound_label;
+    wxRect         m_bound_icon;
+    wxRect         m_bound_hilight;
     int                 m_mode;
     bool                m_hilighted;
     wxBrush            *m_hilightBrush;
@@ -342,15 +342,15 @@ class WXDLLEXPORT wxListLineData : public wxObject
     void GetText( int index, wxString &s );
     void SetText( int index, const wxString s );
     int GetImage( int index );
-    void GetRect( wxRectangle &rect );
+    void GetRect( wxRect &rect );
     void Hilight( bool on );
     void ReverseHilight( void );
     void DrawRubberBand( wxDC *dc, bool on );
     void Draw( wxDC *dc );
-    bool IsInRect( int x, int y, const wxRectangle &rect );
+    bool IsInRect( int x, int y, const wxRect &rect );
     bool IsHilighted( void );
-    void AssignRect( wxRectangle &dest, int x, int y, int width, int height );
-    void AssignRect( wxRectangle &dest, const wxRectangle &source );
+    void AssignRect( wxRect &dest, int x, int y, int width, int height );
+    void AssignRect( wxRect &dest, const wxRect &source );
 };
 
 //-----------------------------------------------------------------------------
@@ -503,7 +503,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
     void SetItemState( long item, long state, long stateMask );
     int GetItemState( long item, long stateMask );
     int GetItemCount( void );
-    void GetItemRect( long index, wxRectangle &rect );
+    void GetItemRect( long index, wxRect &rect );
     bool GetItemPosition(long item, wxPoint& pos);
     int GetSelectedItemCount( void );
     void SetMode( long mode );
@@ -568,7 +568,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
     void SetItemText( long item, const wxString& str );
     long GetItemData( long item ) const;
     bool SetItemData( long item, long data );
-    bool GetItemRect( long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS ) const;
+    bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
     bool GetItemPosition( long item, wxPoint& pos ) const;
     bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
     int GetItemCount(void) const;
diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h
index 5e58c37d5f..0d40d36837 100644
--- a/include/wx/msw/setup.h
+++ b/include/wx/msw/setup.h
@@ -281,6 +281,13 @@
 
 #endif
 
+#if defined(__WXMSW__) && !defined(__WIN32__)
+
+#undef wxUSE_THREADS
+#define wxUSE_THREADS 0
+
+#endif
+
 // Minimal setup e.g. for compiling small utilities
 #define MINIMAL_WXWINDOWS_SETUP 0
 
diff --git a/samples/config/conftest.def b/samples/config/conftest.def
new file mode 100644
index 0000000000..5db07c48eb
--- /dev/null
+++ b/samples/config/conftest.def
@@ -0,0 +1,7 @@
+NAME         Conftest
+DESCRIPTION  'wxWindows Config Sample'
+EXETYPE      WINDOWS
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     4048
+STACKSIZE    16000
diff --git a/samples/treectrl/bitmaps/file1.ico b/samples/treectrl/bitmaps/file1.ico
index cc828ab4f2c896df378febb8e501332db93e4c54..1ee29d83fb25a6eaa89b583fd6aacfeeefacac4a 100644
GIT binary patch
delta 55
ycmdnSv5!fcfq@YS1q1{bKtO|$fk6yJ12ITM0f-qHSb!u0!-0ttB`4c3{{jGn!v;S9

literal 1078
zcmeH`O%B2!6oiLr;?8mdS()BKkM@qnaa{HW_zlFwMHfw6xX>x{{^%n>1}SM$DOtv2
zlCJoiN4_NKe2^Au1>RxO5exWt8zC_iF&vgqwN|_*S|4i75#)2p=8vDg0W|PcSm#!L
zfiIm0@iqdDGlQnP!xDa`^V!E|&DpTupO3!QR@&UZI-tMjuDxNrH}-nkN%m4N@aA_a
FJpqxL*3JL`

diff --git a/samples/treectrl/bitmaps/folder1.ico b/samples/treectrl/bitmaps/folder1.ico
index c43de1c07cd64c30413a2c53f521d0e203198a58..387080ef43b64d5dfd834aa2cb1c487d459f5230 100644
GIT binary patch
delta 55
ycmdnSv5!fcfq@YS1q1{bKtO|$fk6yJ12ITM0f-qHSb!u0!-0ttB`4c3{{jGn!v;S9

literal 1078
zcmeH{F%AMD5Jf+$1(o3lRA!Iiy)2xP!~<!`Q7pZIg~j>?vfUP&SZtvm{`_HB2qB-9
zf(GTB<aiF!5lyL&#~>Yc(nu}C6AaoD0pBjeB)ZJH5J^>QMSWswUDM<lq<P81A3uEq
zcwkew&)xYM&OSHtWf&f322VF3l78j$SQ;$8&kl>Pn`8aB-=0Ml-AgfD*@PpCja_E+
T_r_T%*c$R5s2Azc-l_Bfjgso2

diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp
index 59bfba85ac..3868180f3d 100644
--- a/samples/treectrl/treetest.cpp
+++ b/samples/treectrl/treetest.cpp
@@ -279,7 +279,7 @@ MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
   // should correspond to TreeCtrlIcon_xxx enum
 #if defined(__WXMSW__) && defined(__WIN16__)
   // This is required in 16-bit Windows mode only because we can't load a specific (16x16)
-  // icon image, so it comes out blank (using the empty 32x32 icon).
+  // icon image, so it comes out stretched
   m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE));
   m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE));
 #else
diff --git a/src/common/file.cpp b/src/common/file.cpp
index 2d3f2c1329..8dacc13967 100644
--- a/src/common/file.cpp
+++ b/src/common/file.cpp
@@ -324,7 +324,7 @@ size_t wxFile::Write(const void *pBuf, size_t nCount)
 bool wxFile::Flush()
 {
   if ( IsOpened() ) {
-    #if defined(_MSC_VER) || wxHAVE_FSYNC
+    #if (defined(_MSC_VER) && !defined(__MWERKS__)) || wxHAVE_FSYNC
         if ( fsync(m_fd) == -1 )
         {
             wxLogSysError(_("can't flush file descriptor %d"), m_fd);
diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp
index 5e198b6dac..22f789c196 100644
--- a/src/generic/listctrl.cpp
+++ b/src/generic/listctrl.cpp
@@ -443,7 +443,7 @@ void wxListLineData::GetLabelExtent( int &x, int &y, int &width, int &height )
     height = m_bound_label.height;
 }
 
-void wxListLineData::GetRect( wxRectangle &rect )
+void wxListLineData::GetRect( wxRect &rect )
 {
     AssignRect( rect, m_bound_all );
 }
@@ -641,7 +641,7 @@ void wxListLineData::Draw( wxDC *dc )
     DoDraw( dc, m_hilighted, m_hilighted );
 }
 
-bool wxListLineData::IsInRect( int x, int y, const wxRectangle &rect )
+bool wxListLineData::IsInRect( int x, int y, const wxRect &rect )
 {
     return ((x >= rect.x) && (x <= rect.x+rect.width) && 
             (y >= rect.y) && (y <= rect.y+rect.height));
@@ -652,7 +652,7 @@ bool wxListLineData::IsHilighted( void )
     return m_hilighted;
 }
 
-void wxListLineData::AssignRect( wxRectangle &dest, int x, int y, int width, int height )
+void wxListLineData::AssignRect( wxRect &dest, int x, int y, int width, int height )
 {
     dest.x = x;
     dest.y = y;
@@ -660,7 +660,7 @@ void wxListLineData::AssignRect( wxRectangle &dest, int x, int y, int width, int
     dest.height = height;
 }
 
-void wxListLineData::AssignRect( wxRectangle &dest, const wxRectangle &source )
+void wxListLineData::AssignRect( wxRect &dest, const wxRect &source )
 {
     dest.x = source.x;
     dest.y = source.y;
@@ -1029,7 +1029,7 @@ void wxListMainWindow::RefreshLine( wxListLineData *line )
         wxClientDC dc(this);
         PrepareDC( dc );
         line->GetExtent( x, y, w, h );
-        wxRectangle rect(
+        wxRect rect(
           dc.LogicalToDeviceX(x-3),
           dc.LogicalToDeviceY(y-3),
           dc.LogicalToDeviceXRel(w+6),
@@ -1826,7 +1826,7 @@ int wxListMainWindow::GetItemCount( void )
     return m_lines.Number();
 }
 
-void wxListMainWindow::GetItemRect( long index, wxRectangle &rect )
+void wxListMainWindow::GetItemRect( long index, wxRect &rect )
 {
     wxNode *node = m_lines.Nth( index );
     if (node)
@@ -1848,7 +1848,7 @@ bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos)
     wxNode *node = m_lines.Nth( item );
     if (node)
     {
-        wxRectangle rect;
+        wxRect rect;
         wxListLineData *line = (wxListLineData*)node->Data();
         line->GetRect( rect );
         pos.x = rect.x;
@@ -2511,7 +2511,7 @@ bool wxListCtrl::SetItemData( long item, long data )
     return TRUE;
 }
 
-bool wxListCtrl::GetItemRect( long item, wxRectangle &rect,  int WXUNUSED(code) ) const
+bool wxListCtrl::GetItemRect( long item, wxRect &rect,  int WXUNUSED(code) ) const
 {
     m_mainWin->GetItemRect( item, rect );
     return TRUE;
diff --git a/src/generic/prop.cpp b/src/generic/prop.cpp
index b63cafa0cf..bd2f6c1323 100644
--- a/src/generic/prop.cpp
+++ b/src/generic/prop.cpp
@@ -985,9 +985,9 @@ bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
   wxProperty* prop = GetProperty(name);
   if(prop){
     prop->SetValue(value);
-    return true;
+    return TRUE;
   }else{
-    return false;
+    return FALSE;
   }
 }
 void wxPropertySheet::RemoveProperty(wxString name)
@@ -1002,7 +1002,7 @@ void wxPropertySheet::RemoveProperty(wxString name)
 }	
 bool wxPropertySheet::HasProperty(wxString name)
 { 
-	return (GetProperty(name)?true:false); 
+	return (GetProperty(name)?TRUE:FALSE); 
 }
 // Clear all properties
 void wxPropertySheet::Clear(void)
diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp
index 99b984f77d..522b3d9ad3 100644
--- a/src/generic/treectrl.cpp
+++ b/src/generic/treectrl.cpp
@@ -570,7 +570,7 @@ wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const
   wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   wxArrayTreeItems& children = item.m_pItem->GetChildren();
-  return children.IsEmpty() ? wxTreeItemId() : children.Last();
+  return (children.IsEmpty() ? wxTreeItemId() : wxTreeItemId(children.Last()));
 }
 
 wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
diff --git a/src/make_cw.mcp b/src/make_cw.mcp
index 32016cd192813a1a5b5cec85c35813925fd73db5..4a0fabde9453f3f18fa6ac2232b381ba41d01229 100644
GIT binary patch
delta 7793
zcmb`MdstS*zQ@;Zt@kGIa=(}$plB*8pkiqtqOT|l2xYph6iK5pHA$^(+YW1I;x%!E
zMQQ3$Ytyz;TiaHpsoShPo{rtD?Y6dNT1K7}eKWfm`}<onAWzTJbIu=Uo@XxWGqYyR
z{O0$anHLTo3_sW6kDWGq_DoIF3{9h+nsLXqno&7+N9<mA=jTD+AS9$wI<iv4$!Nw+
zEvwl*jWY4zv~r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IU+bc9Sw3-z33wGIod((zO@p<
zpghe#hj%&uBC#HV1Zbe*W)3pvUnEx1I`DkmzQ=x)wQQ_~Z1O>x_dE=Xc(e(v+0US2
zu&&5?9~D|R)}#sGLp1Mw1i3be_0&h;e2gOW{tk)WYirCa-~|ec-dJs|MSkiG&N@Qq
zecj!yQU3L)DAE;!KSSBk&2Jk}9;SJp2;^EfR^g-I!yV2O)4H*qfhW@l&4+x2veu2Y
zjvc62^RKto$;Rrr8~g@X3{{3XzfLz+)eoqECvzxx&E9@5>!#0WJUP1goz*=`)f)qw
zU)RmYCE(l+9Tvbnoi9eKGiF6MD=rET*;&iY2?Zh-_N%pJ<MC*K$RQUSRBOu?lfhws
z4n<RuXz#M3;aN0MVNqm%wA^gq7bjS>S|?T_9Ec|C`fq+iuK#&rE!Yb_Me~zSBiAyq
z`kw)xs<`1jgxNdewB<dU=CuD1xt57l0m;y<nh#?=CXCl-<2R51!3rEsUO?h_^(mGK
lJe$KX-fL%oX$Qb>Q<w^2Nk=Bu;%neDG~e=qz0Ys9{a>@IXR-hQ

diff --git a/src/makeprog.bcc b/src/makeprog.bcc
index 95ae2e1160..e8f20a2b00 100644
--- a/src/makeprog.bcc
+++ b/src/makeprog.bcc
@@ -16,13 +16,13 @@ nul
 $(LIBS)
 $(TARGET).def
 !
-        rc -K $(TARGET).res
+        brc -K $(TARGET).res
 
 .$(SRCSUFF).obj:
 	bcc $(CPPFLAGS) -c {$< }
 
 $(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+    brc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
 
 clean:
         -erase *.obj
diff --git a/src/makewat.env b/src/makewat.env
index d52e0c2dac..64abaf4388 100644
--- a/src/makewat.env
+++ b/src/makewat.env
@@ -52,8 +52,9 @@ MINDATA     =
 MAXDATA     =
 STACK       = option stack=64k
 EXTRALIBS   = $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib &
-      $(WATLIBDIR)\odbc32.lib $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
-      $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\uuid.lib
+      $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
+      $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib &
+      $(WATLIBDIR)\uuid.lib # $(WATLIBDIR)\odbc32.lib 
 IFLAGS      = -i=$(WXINC) -i=$(%watcom)\h;$(%watcom)\h\nt # -i=$(WXDIR)\include\wx\msw\gnuwin32
 RESFLAGS1   = -r -bt=nt /i$(WXDIR)\include
 RESFLAGS2   = -R $(name) /i$(WXDIR)\include
diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp
index c249619a24..9bb3f31d92 100644
--- a/src/msw/iniconf.cpp
+++ b/src/msw/iniconf.cpp
@@ -355,7 +355,7 @@ bool wxIniConfig::Read(const wxString& szKey, long *pl) const
 
   // is it really nMagic?
   lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename);
-  if ( lVal == nMagic ) {
+  if ( lVal == nMagic2 ) {
     // the nMagic it returned was indeed read from the file
     *pl = lVal;
     return TRUE;
diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc
index f4a4898606..bf74b2988f 100644
--- a/src/msw/makefile.bcc
+++ b/src/msw/makefile.bcc
@@ -77,7 +77,6 @@ GENERICOBJS= \
   $(MSWDIR)\helpxlp.obj \
   $(MSWDIR)\laywin.obj \
   $(MSWDIR)\listctrl.obj \
-  $(MSWDIR)\msgdlgg.obj \
   $(MSWDIR)\notebook.obj \
   $(MSWDIR)\panelg.obj \
   $(MSWDIR)\prop.obj \
@@ -91,6 +90,7 @@ GENERICOBJS= \
   $(MSWDIR)\textdlgg.obj \
   $(MSWDIR)\treectrl.obj
 
+#  $(MSWDIR)\msgdlgg.obj \
 #  $(MSWDIR)\printps.obj \
 #  $(MSWDIR)\prntdlgg.obj \
 
@@ -115,7 +115,6 @@ COMMONOBJS = \
   $(MSWDIR)\memory.obj \
   $(MSWDIR)\module.obj \
   $(MSWDIR)\object.obj \
-  $(MSWDIR)\postscrp.obj \
   $(MSWDIR)\prntbase.obj \
   $(MSWDIR)\resource.obj \
   $(MSWDIR)\resourc2.obj \
@@ -506,8 +505,6 @@ $(MSWDIR)\object.obj:     $(COMMDIR)\object.$(SRCSUFF)
 
 $(MSWDIR)\odbc.obj:     $(COMMDIR)\odbc.$(SRCSUFF)
 
-$(MSWDIR)\postscrp.obj:     $(COMMDIR)\postscrp.$(SRCSUFF)
-
 $(MSWDIR)\prntbase.obj:     $(COMMDIR)\prntbase.$(SRCSUFF)
 
 $(MSWDIR)\resource.obj:     $(COMMDIR)\resource.$(SRCSUFF)
@@ -702,7 +699,7 @@ $(CFG): makefile.bcc
 -Fs-
 -Vf
 -Ff=4
--I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib
+-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
 -I$(WXDIR)\include\wx\msw\gnuwin32
 -L$(BCCDIR)\lib
 -D__WXWIN__
diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95
index 4cd5a40d0e..846779e281 100644
--- a/src/msw/makefile.g95
+++ b/src/msw/makefile.g95
@@ -130,8 +130,6 @@ COMMONOBJS = \
   $(COMMDIR)/extended.$(OBJSUFF) \
   $(COMMDIR)/wincmn.$(OBJSUFF)
 
-#  $(COMMDIR)/postscrp.$(OBJSUFF) \
-
 # NOTE: if the socket-related files fail with a syntax error in Sockets.h,
 # remove the files (probably all GnuWin32 releases < b20). Cygwin b20 is OK,
 # Mingw32 may still have problems.
diff --git a/src/msw/makefile.sl b/src/msw/makefile.sl
index 1a08e2b644..dbd5d612b0 100644
--- a/src/msw/makefile.sl
+++ b/src/msw/makefile.sl
@@ -570,9 +570,6 @@ object.obj:     $(COMMDIR)\object.cpp
 odbc.obj:     $(COMMDIR)\odbc.cpp
   $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\odbc.cpp /BINARY odbc.obj
 
-postscrp.obj:     $(COMMDIR)\postcrp.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\postcrp.cpp /BINARY postscrp.obj
-
 prntbase.obj:     $(COMMDIR)\prntbase.cpp
   $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\prntbase.cpp /BINARY prntbase.obj
 
diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc
index b197ff7de3..908f09f85b 100644
--- a/src/msw/makefile.vc
+++ b/src/msw/makefile.vc
@@ -76,8 +76,7 @@ NONESSENTIALOBJS= \
   $(GENDIR)\msgdlgg.obj \
   $(GENDIR)\helpxlp.obj \
   $(GENDIR)\colrdlgg.obj \
-  $(GENDIR)\fontdlgg.obj \
-  $(COMMDIR)\postscrp.obj
+  $(GENDIR)\fontdlgg.obj
 
 COMMONOBJS = \
   $(COMMDIR)\cmndata.obj \
@@ -882,11 +881,6 @@ $(COMMDIR)/odbc.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
-$(COMMDIR)/postscrp.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
 $(COMMDIR)/prntbase.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat
index 9315e3d1b3..5e14fef2ee 100644
--- a/src/msw/makefile.wat
+++ b/src/msw/makefile.wat
@@ -223,7 +223,7 @@ $(LIBTARGET) : $(OBJECTS)
 #    wlib /b /c /n /p=512 $^@ @tmp.lbc
 	
 	
-clean:   $(EXTRATARGETSCLEAN)
+clean:   .SYMBOLIC $(EXTRATARGETSCLEAN)
     -erase *.obj
     -erase $(LIBTARGET)
     -erase *.pch
@@ -582,9 +582,6 @@ object.obj:     $(COMMDIR)\object.cpp
 odbc.obj:     $(COMMDIR)\odbc.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
-postscrp.obj:     $(COMMDIR)\postcrp.cpp
-  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-
 prntbase.obj:     $(COMMDIR)\prntbase.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
diff --git a/src/xpm/xpm34.h b/src/xpm/xpm34.h
index fba32dbc2b..1f7c046197 100644
--- a/src/xpm/xpm34.h
+++ b/src/xpm/xpm34.h
@@ -40,7 +40,7 @@
 #ifndef XPM_h
 #define XPM_h
 
-#if defined(_WINDOWS) || defined(__WXMSW__) || defined(WIN32)
+#if (defined(_WINDOWS) || defined(__WXMSW__) || defined(WIN32)) && !defined(FOR_MSW)
 #define FOR_MSW
 #endif
 
-- 
2.50.0

