From 16ff355beecc7c166a22797ea835475b58edbcb8 Mon Sep 17 00:00:00 2001
From: David Webster <Dave.Webster@bhmi.com>
Date: Mon, 6 May 2002 21:48:06 +0000
Subject: [PATCH] OS/2 Image processing updates along with some statusbar
 updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/os2/bitmap.cpp  |  32 +++++++--
 src/os2/dc.cpp      | 162 ++++++++++++++++++++++++++++++++++++++------
 src/os2/frame.cpp   |   5 ++
 src/os2/icon.cpp    |  94 ++++++++++++++++++++-----
 src/os2/makefile.va |  19 +++++-
 src/os2/wx23.def    |  49 ++++++++++++++
 6 files changed, 317 insertions(+), 44 deletions(-)

diff --git a/src/os2/bitmap.cpp b/src/os2/bitmap.cpp
index 94dcdeaa5d..ff5b76535a 100644
--- a/src/os2/bitmap.cpp
+++ b/src/os2/bitmap.cpp
@@ -86,6 +86,7 @@ void wxBitmapRefData::Free()
 // this function should be called from all wxBitmap ctors
 void wxBitmap::Init()
 {
+    m_bIsMono = FALSE;
 } // end of wxBitmap::Init
 
 bool wxBitmap::CopyFromIconOrCursor(
@@ -113,9 +114,11 @@ bool wxBitmap::CopyFromIconOrCursor(
 
     pRefData->m_hBitmap = (WXHBITMAP)SIconInfo.hbmColor;
 
-    //
-    // No mask in the Info struct in OS/2
-    //
+    wxMask*                         pMask = new wxMask(SIconInfo.hbmPointer);
+
+    pMask->SetMaskBitmap(GetHBITMAP());
+    SetMask(pMask);
+
     return(TRUE);
 } // end of wxBitmap::CopyFromIconOrCursor
 
@@ -315,6 +318,12 @@ bool wxBitmap::Create(
     GetBitmapData()->m_nHeight = nH;
     GetBitmapData()->m_nDepth = nD;
 
+    //
+    // Xpms and bitmaps from other images can also be mono's, but only
+    // mono's need help changing their colors with MemDC changes
+    //
+    if (nD == 1)
+        m_bIsMono = TRUE;
     if (nD > 0)
     {
         DEVOPENSTRUC                vDop  = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
@@ -327,7 +336,7 @@ bool wxBitmap::Create(
         vHeader.cx        = nW;
         vHeader.cy        = nH;
         vHeader.cPlanes   = 1;
-        vHeader.cBitCount = nD;
+        vHeader.cBitCount = 24; //nD;
 
         hBmp = ::GpiCreateBitmap( hPS
                                  ,&vHeader
@@ -618,7 +627,6 @@ bool wxBitmap::CreateFromImage (
                              ,NULL
                              ,NULL
                             );
-    hBmpOld = ::GpiSetBitmap(hPS, hBmp);
 #if wxUSE_PALETTE
     HPAL                            hOldPalette = NULLHANDLE;
     if (rImage.GetPalette().Ok())
@@ -638,6 +646,14 @@ bool wxBitmap::CreateFromImage (
     unsigned char*                  ptdata = pData;
     unsigned char*                  ptbits;
 
+    if ((hBmpOld = ::GpiSetBitmap(hPS, hBmp)) == HBM_ERROR)
+    {
+        ERRORID                 vError;
+        wxString                sError;
+
+        vError = ::WinGetLastError(vHabmain);
+        sError = wxPMErrorToStr(vError);
+    }
     for (n = 0; n < nNumDIB; n++)
     {
         if (nNumDIB > 1 && n == nNumDIB - 1 && nHRemain > 0)
@@ -760,7 +776,11 @@ bool wxBitmap::CreateFromImage (
             {
                 for (i = 0; i < nWidth; i++)
                 {
-                    if ((*(ptdata++) != cRed) || (*(ptdata++) != cGreen) || (*(ptdata++) != cBlue))
+                    unsigned char cRedImage   = (*(ptdata++)) ;
+                    unsigned char cGreenImage = (*(ptdata++)) ;
+                    unsigned char cBlueImage  = (*(ptdata++)) ;
+
+                    if ((cRedImage != cRed) || (cGreenImage != cGreen) || (cBlueImage != cBlue))
                     {
                         *(ptbits++) = cOne;
                         *(ptbits++) = cOne;
diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp
index daa44afdec..133ebb03d6 100644
--- a/src/os2/dc.cpp
+++ b/src/os2/dc.cpp
@@ -1189,15 +1189,21 @@ void wxDC::DoDrawIcon(
 , wxCoord                           vY
 )
 {
-    vY = OS2Y(vY,rIcon.GetHeight());
-    wxCHECK_RET( rIcon.Ok(), wxT("invalid icon in DrawIcon") );
-
-    ::WinDrawPointer( GetHPS()
-                     ,vX
-                     ,vY
-                     ,(HPOINTER)GetHiconOf(rIcon)
-                     ,DP_NORMAL
-                    );
+    //
+    // Need to copy back into a bitmap.  ::WinDrawPointer uses device coords
+    // and I don't feel like figuring those out for scrollable windows so
+    // just convert to a bitmap then let the DoDrawBitmap routing display it
+    //
+    if (rIcon.IsXpm())
+    {
+        DoDrawBitmap(rIcon.GetXpmSrc(), vX, vY, TRUE);
+    }
+    else
+    {
+        wxBitmap                        vBitmap(rIcon);
+
+        DoDrawBitmap(vBitmap, vX, vY, FALSE);
+    }
     CalcBoundingBox(vX, vY);
     CalcBoundingBox(vX + rIcon.GetWidth(), vY + rIcon.GetHeight());
 } // end of wxDC::DoDrawIcon
@@ -1366,28 +1372,28 @@ void wxDC::DoDrawBitmap(
                     for (j = 0; j < rBmp.GetWidth(); j++)
                     {
                         // Byte 1
-                        if (*pucDataMask == 0x00) // leave bitmap byte alone
+                        if (*pucDataMask == 0xFF) // leave bitmap byte alone
                             pucData++;
                         else
                         {
-                            *pucData = (unsigned char)lColor;
+                            *pucData = ((unsigned char)(lColor >> 16));
                             pucData++;
                         }
                         // Byte 2
-                        if (*(pucDataMask + 1) == 0x00) // leave bitmap byte alone
+                        if (*(pucDataMask + 1) == 0xFF) // leave bitmap byte alone
                             pucData++;
                         else
                         {
-                            *pucData = (unsigned char)lColor >> 8;
+                            *pucData = ((unsigned char)(lColor >> 8));
                             pucData++;
                         }
 
                         // Byte 3
-                        if (*(pucDataMask + 2) == 0x00) // leave bitmap byte alone
+                        if (*(pucDataMask + 2) == 0xFF) // leave bitmap byte alone
                             pucData++;
                         else
                         {
-                            *pucData = (unsigned char)lColor >> 16;
+                            *pucData = ((unsigned char)lColor);
                             pucData++;
                         }
                         pucDataMask += 3;
@@ -1398,7 +1404,6 @@ void wxDC::DoDrawBitmap(
                         pucDataMask++;
                     }
                 }
-
                 //
                 // Create a new bitmap
                 //
@@ -1440,8 +1445,8 @@ void wxDC::DoDrawBitmap(
         }
         else
         {
-            LONG                        lOldTextground = ::GpiQueryColor((HPS)GetHPS());
-            LONG                        lOldBackground = ::GpiQueryBackColor((HPS)GetHPS());
+            LONG                        lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
+            LONG                        lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
 
             if (m_textForegroundColour.Ok())
             {
@@ -1455,6 +1460,123 @@ void wxDC::DoDrawBitmap(
                                   ,m_textBackgroundColour.GetPixel()
                                  );
             }
+            //
+            // Need to alter bits in a mono bitmap to match the new
+            // background-foreground if it is different.
+            //
+            if (rBmp.IsMono() &&
+               ((m_textForegroundColour.GetPixel() != lOldForeGround) ||
+                (m_textBackgroundColour.GetPixel() != lOldBackGround)))
+            {
+                DEVOPENSTRUC        vDop  = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
+                SIZEL               vSize = {0, 0};
+                HDC                 hDC   = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
+                HPS                 hPS   = ::GpiCreatePS(vHabmain, hDC, &vSize, PU_PELS | GPIA_ASSOC);
+
+                int                 nBytesPerLine = rBmp.GetWidth() * 3;
+                int                 i, j;
+                LONG                lForeGround = m_textForegroundColour.GetPixel();
+                LONG                lBackGround = m_textBackgroundColour.GetPixel();
+                LONG                lScans;
+                HBITMAP             hOldBitmap = NULLHANDLE;
+                BITMAPINFO2         vInfo;
+                ERRORID             vError;
+                wxString            sError;
+
+
+                memset(&vInfo, '\0', 16);
+                vInfo.cbFix           = 16;
+                vInfo.cx              = (ULONG)rBmp.GetWidth();
+                vInfo.cy              = (ULONG)rBmp.GetHeight();
+                vInfo.cPlanes         = 1;
+                vInfo.cBitCount       = 24;
+
+                unsigned char*          pucBits;     // buffer that will contain the bitmap data
+                unsigned char*          pucData;     // pointer to use to traverse bitmap data
+
+                pucBits = new unsigned char[nBytesPerLine * rBmp.GetHeight()];
+                memset(pucBits, '\0', (nBytesPerLine * rBmp.GetHeight()));
+
+                if ((hOldBitmap = ::GpiSetBitmap(hPS, hBitmap)) == HBM_ERROR)
+                {
+                    vError = ::WinGetLastError(vHabmain);
+                    sError = wxPMErrorToStr(vError);
+                    return;
+                }
+                if ((lScans = ::GpiQueryBitmapBits( hPS
+                                                   ,0L
+                                                   ,(LONG)rBmp.GetHeight()
+                                                   ,(PBYTE)pucBits
+                                                   ,&vInfo
+                                                  )) == GPI_ALTERROR)
+                {
+                    vError = ::WinGetLastError(vHabmain);
+                    sError = wxPMErrorToStr(vError);
+                    return;
+                }
+                unsigned char           cOldRedFore   = (unsigned char)(lOldForeGround >> 16);
+                unsigned char           cOldGreenFore = (unsigned char)(lOldForeGround >> 8);
+                unsigned char           cOldBlueFore  = (unsigned char)lOldForeGround;
+
+                unsigned char           cOldRedBack   = (unsigned char)(lOldBackGround >> 16);
+                unsigned char           cOldGreenBack = (unsigned char)(lOldBackGround >> 8);
+                unsigned char           cOldBlueBack  = (unsigned char)lOldBackGround;
+
+                unsigned char           cRedFore   = (unsigned char)(lForeGround >> 16);
+                unsigned char           cGreenFore = (unsigned char)(lForeGround >> 8);
+                unsigned char           cBlueFore  = (unsigned char)lForeGround;
+
+                unsigned char           cRedBack   = (unsigned char)(lBackGround >> 16);
+                unsigned char           cGreenBack = (unsigned char)(lBackGround >> 8);
+                unsigned char           cBlueBack  = (unsigned char)lBackGround;
+
+                pucData = pucBits;
+                for (i = 0; i < rBmp.GetHeight(); i++)
+                {
+                    for (j = 0; j < rBmp.GetWidth(); j++)
+                    {
+                        unsigned char    cBmpRed   = *pucData;
+                        unsigned char    cBmpGreen = *(pucData + 1);
+                        unsigned char    cBmpBlue  = *(pucData + 2);
+
+                        if ((cBmpRed == cOldRedFore) &&
+                            (cBmpGreen == cOldGreenFore) &&
+                            (cBmpBlue == cOldBlueFore))
+                        {
+                            *pucData = cRedFore;
+                            pucData++;
+                            *pucData = cGreenFore;
+                            pucData++;
+                            *pucData = cBlueFore;
+                            pucData++;
+                        }
+                        else
+                        {
+                            *pucData = cRedBack;
+                            pucData++;
+                            *pucData = cGreenBack;
+                            pucData++;
+                            *pucData = cBlueBack;
+                            pucData++;
+                        }
+                    }
+                }
+                if ((lScans = ::GpiSetBitmapBits( hPS
+                                                 ,0L
+                                                 ,(LONG)rBmp.GetHeight()
+                                                 ,(PBYTE)pucBits
+                                                 ,&vInfo
+                                                )) == GPI_ALTERROR)
+                {
+                    vError = ::WinGetLastError(vHabmain);
+                    sError = wxPMErrorToStr(vError);
+                    return;
+                }
+                delete [] pucBits;
+                ::GpiSetBitmap(hPS, NULLHANDLE);
+                ::GpiDestroyPS(hPS);
+                ::DevCloseDC(hDC);
+            }
             ::GpiWCBitBlt( (HPS)GetHPS()
                           ,hBitmap
                           ,4
@@ -1463,8 +1585,8 @@ void wxDC::DoDrawBitmap(
                           ,BBO_IGNORE
                          );
             ::GpiSetBitmap((HPS)GetHPS(), hBitmapOld);
-            ::GpiSetColor((HPS)GetHPS(), lOldTextground);
-            ::GpiSetBackColor((HPS)GetHPS(), lOldBackground);
+            ::GpiSetColor((HPS)GetHPS(), lOldForeGround);
+            ::GpiSetBackColor((HPS)GetHPS(), lOldBackGround);
         }
     }
 } // end of wxDC::DoDrawBitmap
diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp
index bca65d8c35..a49e174364 100644
--- a/src/os2/frame.cpp
+++ b/src/os2/frame.cpp
@@ -1146,6 +1146,11 @@ bool wxFrame::HandleMenuSelect(
             vEvent.SetEventObject(this);
             GetEventHandler()->ProcessEvent(vEvent); // return value would be ignored by PM
         }
+        else
+        {
+            DoGiveHelp(wxEmptyString, FALSE);
+            return FALSE;
+        }
     }
     return TRUE;
 } // end of wxFrame::HandleMenuSelect
diff --git a/src/os2/icon.cpp b/src/os2/icon.cpp
index d1c390da8f..fe662a13f8 100644
--- a/src/os2/icon.cpp
+++ b/src/os2/icon.cpp
@@ -101,6 +101,8 @@ void wxIcon::CopyFromBitmap(
 )
 {
     wxMask*                         pMask = rBmp.GetMask();
+    HBITMAP                         hBmp = NULLHANDLE;
+    HBITMAP                         hBmpMask = NULLHANDLE;
     HBITMAP                         hOldBitmap = NULLHANDLE;
     ERRORID                         vError;
     wxString                        sError;
@@ -117,13 +119,7 @@ void wxIcon::CopyFromBitmap(
                           );
     }
 
-    POINTERINFO                        vIconInfo;
-
-    memset(&vIconInfo, '\0', sizeof(POINTERINFO));
-    vIconInfo.fPointer = FALSE;  // we want an icon, not a pointer
-    vIconInfo.hbmPointer = (HBITMAP) pMask->GetMaskBitmap();
-    vIconInfo.hbmColor = GetHbitmapOf(rBmp);
-
+    BITMAPINFOHEADER2               vHeader;
     SIZEL                           vSize = {0, 0};
     DEVOPENSTRUC                    vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
     HDC                             hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
@@ -133,22 +129,85 @@ void wxIcon::CopyFromBitmap(
     POINTL                          vPoint[4] = { 0, 0, rBmp.GetWidth(), rBmp.GetHeight(),
                                                   0, 0, rBmp.GetWidth(), rBmp.GetHeight()
                                                 };
-    if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, (HBITMAP) pMask->GetMaskBitmap())) == HBM_ERROR)
+    POINTL                          vPointMask[4] = { 0, 0, rBmp.GetWidth(), rBmp.GetHeight(),
+                                                      0, 0, rBmp.GetWidth(), rBmp.GetHeight()
+                                                    };
+
+    POINTERINFO                     vIconInfo;
+
+    memset(&vIconInfo, '\0', sizeof(POINTERINFO));
+    vIconInfo.fPointer = FALSE;  // we want an icon, not a pointer
+
+    memset(&vHeader, '\0', 16);
+    vHeader.cbFix           = 16;
+    vHeader.cx              = (ULONG)rBmp.GetWidth();
+    vHeader.cy              = (ULONG)rBmp.GetHeight();
+    vHeader.cPlanes         = 1L;
+    vHeader.cBitCount       = 24;
+
+    hBmp = ::GpiCreateBitmap( hPSDst
+                             ,&vHeader
+                             ,0L
+                             ,NULL
+                             ,NULL
+                            );
+
+    if ((hOldBitmap = ::GpiSetBitmap(hPSDst, hBmp)) == HBM_ERROR)
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
     }
-    if ((hOldBitmap = ::GpiSetBitmap(hPSDst, (HBITMAP) vIconInfo.hbmColor)) == HBM_ERROR)
+    if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, (HBITMAP)rBmp.GetHBITMAP())) == HBM_ERROR)
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
     }
-    ::GpiSetBitmapId(hPSDst, (HBITMAP) vIconInfo.hbmColor, 1L);
     if ((lHits = ::GpiBitBlt( hPSDst
                              ,hPSSrc
                              ,4L
                              ,vPoint
-                             ,ROP_SRCAND
+                             ,ROP_SRCCOPY
+                             ,BBO_IGNORE
+                            )) == GPI_ERROR)
+    {
+        vError = ::WinGetLastError(vHabmain);
+        sError = wxPMErrorToStr(vError);
+    }
+    if ((hOldBitmap = ::GpiSetBitmap(hPSDst, NULLHANDLE)) == HBM_ERROR)
+    {
+        vError = ::WinGetLastError(vHabmain);
+        sError = wxPMErrorToStr(vError);
+    }
+    if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, NULLHANDLE)) == HBM_ERROR)
+    {
+        vError = ::WinGetLastError(vHabmain);
+        sError = wxPMErrorToStr(vError);
+    }
+    vIconInfo.hbmColor = hBmp;
+
+    vHeader.cy              = (ULONG)rBmp.GetHeight();
+    hBmpMask = ::GpiCreateBitmap( hPSDst
+                                 ,&vHeader
+                                 ,0L
+                                 ,NULL
+                                 ,NULL
+                                );
+
+    if ((hOldBitmap = ::GpiSetBitmap(hPSDst, hBmpMask)) == HBM_ERROR)
+    {
+        vError = ::WinGetLastError(vHabmain);
+        sError = wxPMErrorToStr(vError);
+    }
+    if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, (HBITMAP)pMask->GetMaskBitmap())) == HBM_ERROR)
+    {
+        vError = ::WinGetLastError(vHabmain);
+        sError = wxPMErrorToStr(vError);
+    }
+    if ((lHits = ::GpiBitBlt( hPSDst
+                             ,hPSSrc
+                             ,4L
+                             ,vPointMask
+                             ,ROP_SRCCOPY
                              ,BBO_IGNORE
                             )) == GPI_ERROR)
     {
@@ -166,12 +225,7 @@ void wxIcon::CopyFromBitmap(
         sError = wxPMErrorToStr(vError);
     }
 
-    ::GpiSetBitmap(hPSSrc, NULL);
-    ::GpiSetBitmap(hPSDst, NULL);
-    ::GpiDestroyPS(hPSSrc);
-    ::GpiDestroyPS(hPSDst);
-    ::DevCloseDC(hDCSrc);
-    ::DevCloseDC(hDCDst);
+    vIconInfo.hbmPointer = hBmpMask;
 
     HICON                           hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP
                                                                        ,&vIconInfo
@@ -198,6 +252,12 @@ void wxIcon::CopyFromBitmap(
         //
         delete pMask;
     }
+    ::GpiSetBitmap(hPSSrc, NULL);
+    ::GpiSetBitmap(hPSDst, NULL);
+    ::GpiDestroyPS(hPSSrc);
+    ::GpiDestroyPS(hPSDst);
+    ::DevCloseDC(hDCSrc);
+    ::DevCloseDC(hDCDst);
 } // end of wxIcon::CopyFromBitmap
 
 bool wxIcon::LoadFile(
diff --git a/src/os2/makefile.va b/src/os2/makefile.va
index 003352d949..67b7fd9d92 100644
--- a/src/os2/makefile.va
+++ b/src/os2/makefile.va
@@ -25,6 +25,7 @@ LIBTARGET=$(WXLIB)
 COMTEMPTGT1=$(WXDIR)\lib\wxcom1.lib
 COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib
 COMTEMPTGT3=$(WXDIR)\lib\wxcom3.lib
+COMTEMPTGT4=$(WXDIR)\lib\wxcom4.lib
 GENTEMPTGT=$(WXDIR)\lib\wxgen.lib
 NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib
 OS2TEMPTGT1=$(WXDIR)\lib\wxos21.lib
@@ -295,6 +296,7 @@ COMMONOBJS = \
   ..\common\$D\sckfile.obj \
   ..\common\$D\sckipc.obj \
   ..\common\$D\sckstrm.obj \
+  ..\common\$D\settcmn.obj \
   ..\common\$D\sizer.obj \
   ..\common\$D\socket.obj \
   ..\common\$D\statbar.obj \
@@ -430,6 +432,7 @@ COMLIBOBJS3 = \
   sckfile.obj \
   sckipc.obj \
   sckstrm.obj \
+  settcmn.obj \
   sizer.obj \
   socket.obj \
   statbar.obj \
@@ -458,7 +461,9 @@ COMLIBOBJS3 = \
   wxchar.obj \
   wxexpr.obj \
   xpmdecod.obj \
-  y_tab.obj \
+  y_tab.obj
+
+COMLIBOBJS4 = \
   zipstrm.obj \
   zstream.obj
 
@@ -800,6 +805,7 @@ $(COMLIBOBJS3):
   copy ..\common\$D\sckfile.obj
   copy ..\common\$D\sckipc.obj
   copy ..\common\$D\sckstrm.obj
+  copy ..\common\$D\settcmn.obj
   copy ..\common\$D\sizer.obj
   copy ..\common\$D\socket.obj
   copy ..\common\$D\statbar.obj
@@ -829,6 +835,8 @@ $(COMLIBOBJS3):
   copy ..\common\$D\wxexpr.obj
   copy ..\common\$D\xpmdecod.obj
   copy ..\common\$D\y_tab.obj
+
+$(COMLIBOBJS4):
   copy ..\common\$D\zipstrm.obj
   copy ..\common\$D\zstream.obj
 
@@ -1038,6 +1046,13 @@ $(WXDIR)\lib\wxcom3.lib: $(COMLIBOBJS3)
     $**;
 <<
 
+$(WXDIR)\lib\wxcom4.lib: $(COMLIBOBJS4)
+ -touch $(WXDIR)\lib\wxcom4.lib
+ -del $(WXDIR)\lib\wxcom4.lib
+ ilib $(LIBFLAGS) $@ @<<
+    $**;
+<<
+
 $(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS)
  -touch $(WXDIR)\lib\wxgen.lib
  -del $(WXDIR)\lib\wxgen.lib
@@ -1079,6 +1094,7 @@ $(WXDIR)\lib\wx.lib: \
   $(COMTEMPTGT1) \
   $(COMTEMPTGT2) \
   $(COMTEMPTGT3) \
+  $(COMTEMPTGT4) \
   $(GENTEMPTGT) \
   $(HTMLTEMPTGT) \
   $(NONESTEMPTGT) \
@@ -1093,6 +1109,7 @@ $(WXDIR)\lib\wx.lib: \
  del $(COMTEMPTGT1)
  del $(COMTEMPTGT2)
  del $(COMTEMPTGT3)
+ del $(COMTEMPTGT4)
  del $(GENTEMPTGT)
  del $(HTMLTEMPTGT)
  del $(NONESTEMPTGT)
diff --git a/src/os2/wx23.def b/src/os2/wx23.def
index 46d454bddb..c43974e692 100644
--- a/src/os2/wx23.def
+++ b/src/os2/wx23.def
@@ -2452,6 +2452,8 @@ EXPORTS
     ;PUBDEFs (Symbols available from object file):
       ;wxFrameBase::OnIdle(wxIdleEvent&)
       OnIdle__11wxFrameBaseFR11wxIdleEvent
+      ;wxFrameBase::PushStatusText(const wxString&,int)
+      PushStatusText__11wxFrameBaseFRC8wxStringi
       ;wxFrameBase::DeleteAllBars()
       DeleteAllBars__11wxFrameBaseFv
       ;wxFrameBase::SetMenuBar(wxMenuBar*)
@@ -2478,6 +2480,8 @@ EXPORTS
       ProcessCommand__11wxFrameBaseFi
       ;wxFrameBase::SetStatusWidths(int,const int*)
       SetStatusWidths__11wxFrameBaseFiPCi
+      ;wxFrameBase::PopStatusText(int)
+      PopStatusText__11wxFrameBaseFi
       ;wxFrameBase::wxFrameBase()
       __ct__11wxFrameBaseFv
       ;wxFrameBase::CreateToolBar(long,int,const wxString&)
@@ -2492,6 +2496,8 @@ EXPORTS
       __dt__11wxFrameBaseFv
       ;wxFrameBase::AttachMenuBar(wxMenuBar*)
       AttachMenuBar__11wxFrameBaseFP9wxMenuBar
+      ;wxFrameBase::DoGiveHelp(const wxString&,unsigned long)
+      DoGiveHelp__11wxFrameBaseFRC8wxStringUl
       __vft11wxFrameBase8wxObject
       ;wxFrameBase::SetStatusText(const wxString&,int)
       SetStatusText__11wxFrameBaseFRC8wxStringi
@@ -4962,6 +4968,14 @@ EXPORTS
       __vft14wxSocketStream13wxInputStream12wxStreamBase
       ;wxSocketOutputStream::~wxSocketOutputStream()
       __dt__20wxSocketOutputStreamFv
+  ;From object file:  ..\common\settcmn.cpp
+    ;PUBDEFs (Symbols available from object file):
+      ;wxSystemSettings::ms_screen
+      ms_screen__16wxSystemSettings
+      ;wxSystemSettings::SetScreen(wxSystemScreen)
+      SetScreen__16wxSystemSettingsF14wxSystemScreen
+      ;wxSystemSettings::GetScreen()
+      GetScreen__16wxSystemSettingsFv
   ;From object file:  ..\common\sizer.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxSizerItem::wxSizerItem(int,int,int,int,int,wxObject*)
@@ -5244,25 +5258,40 @@ EXPORTS
       GetLocal__12wxSocketBaseCFR13wxSockAddress
   ;From object file:  ..\common\statbar.cpp
     ;PUBDEFs (Symbols available from object file):
+      ;wxStatusBarBase::PopStatusText(int)
+      PopStatusText__15wxStatusBarBaseFi
       ;wxStatusBarBase::FreeWidths()
       FreeWidths__15wxStatusBarBaseFv
       __vft15wxStatusBarBase8wxObject
+      ;wxStatusBarBase::GetStatusStack(int) const
+      GetStatusStack__15wxStatusBarBaseCFi
       ;wxStatusBarBase::InitWidths()
       InitWidths__15wxStatusBarBaseFv
       ;wxStatusBar::sm_classwxStatusBar
       sm_classwxStatusBar__11wxStatusBar
       ;wxStatusBarBase::~wxStatusBarBase()
       __dt__15wxStatusBarBaseFv
+      ;wxStatusBarBase::InitStacks()
+      InitStacks__15wxStatusBarBaseFv
+      ;wxwxListStringNode::DeleteData()
+      DeleteData__18wxwxListStringNodeFv
       ;wxStatusBarBase::SetStatusWidths(int,const int*)
       SetStatusWidths__15wxStatusBarBaseFiPCi
+      ;wxStatusBarBase::GetOrCreateStatusStack(int)
+      GetOrCreateStatusStack__15wxStatusBarBaseFi
       ;wxStatusBarBase::CalculateAbsWidths(int) const
       CalculateAbsWidths__15wxStatusBarBaseCFi
       ;wxStatusBarBase::wxStatusBarBase()
       __ct__15wxStatusBarBaseFv
       ;wxStatusBarBase::SetFieldsCount(int,const int*)
       SetFieldsCount__15wxStatusBarBaseFiPCi
+      ;wxStatusBarBase::PushStatusText(const wxString&,int)
+      PushStatusText__15wxStatusBarBaseFRC8wxStringi
+      ;wxStatusBarBase::FreeStacks()
+      FreeStacks__15wxStatusBarBaseFv
       ;wxConstructorForwxStatusBar()
       wxConstructorForwxStatusBar__Fv
+      __vft18wxwxListStringNode10wxNodeBase
   ;From object file:  ..\common\strconv.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxStrConvModule::sm_classwxStrConvModule
@@ -7180,6 +7209,24 @@ EXPORTS
       __vft16wxZipInputStream12wxStreamBase
       ;wxZipInputStream::Eof() const
       Eof__16wxZipInputStreamCFv
+  ;From object file:  ..\common\zstream.cpp
+    ;PUBDEFs (Symbols available from object file):
+      ;wxZlibInputStream::wxZlibInputStream(wxInputStream&)
+      __ct__17wxZlibInputStreamFR13wxInputStream
+      ;wxZlibOutputStream::wxZlibOutputStream(wxOutputStream&,int)
+      __ct__18wxZlibOutputStreamFR14wxOutputStreami
+      ;wxZlibInputStream::OnSysRead(void*,unsigned int)
+      OnSysRead__17wxZlibInputStreamFPvUi
+      ;wxZlibOutputStream::Sync()
+      Sync__18wxZlibOutputStreamFv
+      ;wxZlibOutputStream::OnSysWrite(const void*,unsigned int)
+      OnSysWrite__18wxZlibOutputStreamFPCvUi
+      __vft18wxZlibOutputStream12wxStreamBase
+      ;wxZlibInputStream::~wxZlibInputStream()
+      __dt__17wxZlibInputStreamFv
+      ;wxZlibOutputStream::~wxZlibOutputStream()
+      __dt__18wxZlibOutputStreamFv
+      __vft17wxZlibInputStream12wxStreamBase
   ;From object file:  ..\generic\busyinfo.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxBusyInfo::~wxBusyInfo()
@@ -14712,6 +14759,8 @@ EXPORTS
       wxGetMousePosition__FPiT1
       ;wxDrawBorder(unsigned long,_RECTL&,unsigned long)
       wxDrawBorder__FUlR6_RECTLT1
+      ;wxShutdown(wxShutdownFlags)
+      wxShutdown__F15wxShutdownFlags
       ;wxPathExists(const wxString&)
       wxPathExists__FRC8wxString
       ;wxGetWindowText(unsigned long)
-- 
2.50.0

