From 2b0ec34b1a083595a606b3eb04f4b64bc69955b8 Mon Sep 17 00:00:00 2001
From: David Webster <Dave.Webster@bhmi.com>
Date: Thu, 24 May 2001 16:01:45 +0000
Subject: [PATCH] Adding borders to OS/2 objects

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/os2/dc.cpp       | 10 ++++++++--
 src/os2/dcclient.cpp |  6 ++++++
 src/os2/frame.cpp    |  9 +++++++++
 src/os2/wx23.def     |  2 ++
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp
index 883aa74a06..4db821983a 100644
--- a/src/os2/dc.cpp
+++ b/src/os2/dc.cpp
@@ -155,6 +155,8 @@ int SetBkMode(
 
 wxDC::wxDC(void)
 {
+    wxColour                        vColor;
+
     m_pCanvas      = NULL;
 
     m_hOldBitmap   = 0;
@@ -168,7 +170,11 @@ wxDC::wxDC(void)
     m_hOldPS       = NULL;
     m_hPS          = NULL;
     m_bIsPaintTime = FALSE; // True at Paint Time
-    m_brush.GetColour().Set("WHITE");
+
+    vColor.InitFromName("BLACK");
+    m_pen.SetColour(vColor);
+    vColor.Set("WHITE");
+    m_brush.SetColour(vColor);
 } // end of wxDC::wxDC
 
 wxDC::~wxDC(void)
@@ -816,7 +822,7 @@ void wxDC::DoDrawRectangle(
         vPoint[0].x = vX + 1;
         vPoint[0].y = vY + 1;
         vPoint[1].x = vX + vWidth - 2;
-        vPoint[1].y = vY + vHeight + 2;
+        vPoint[1].y = vY + vHeight - 2;
         ::GpiMove(m_hPS, &vPoint[0]);
         ::GpiBox( m_hPS
                  ,lControl
diff --git a/src/os2/dcclient.cpp b/src/os2/dcclient.cpp
index 2ee419bd58..cdb7003da7 100644
--- a/src/os2/dcclient.cpp
+++ b/src/os2/dcclient.cpp
@@ -142,6 +142,12 @@ wxWindowDC::wxWindowDC(
 
 void wxWindowDC::InitDC()
 {
+    wxColour                        vColor;
+
+    vColor.InitFromName("BLACK");
+    m_pen.SetColour(vColor);
+    vColor.Set("WHITE");
+    m_brush.SetColour(vColor);
     //
     // The background mode is only used for text background and is set in
     // DrawText() to OPAQUE as required, otherwise always TRANSPARENT,
diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp
index dbc1e6be98..457b712767 100644
--- a/src/os2/frame.cpp
+++ b/src/os2/frame.cpp
@@ -1109,6 +1109,15 @@ void wxFrame::OnActivate(
     }
 } // end of wxFrame::OnActivate
 
+void wxFrame::RemoveChild(
+  wxWindowBase*                     pChild
+)
+{
+    if (pChild == m_pWinLastFocused)
+        m_pWinLastFocused = NULL;
+    wxFrameBase::RemoveChild(pChild);
+} // end of wxFrame::RemoveChild
+
 // ----------------------------------------------------------------------------
 // wxFrame size management: we exclude the areas taken by menu/status/toolbars
 // from the client area, so the client area is what's really available for the
diff --git a/src/os2/wx23.def b/src/os2/wx23.def
index e2bf74f35c..88516a1957 100644
--- a/src/os2/wx23.def
+++ b/src/os2/wx23.def
@@ -11507,6 +11507,8 @@ EXPORTS
       Iconize__7wxFrameFUl
       ;wxFrame::HandleMenuSelect(unsigned short,unsigned short,unsigned long)
       HandleMenuSelect__7wxFrameFUsT1Ul
+      ;wxFrame::RemoveChild(wxWindowBase*)
+      RemoveChild__7wxFrameFP12wxWindowBase
       ;wxFrame::OS2TranslateMessage(void**)
       OS2TranslateMessage__7wxFrameFPPv
       ;wxFrame::HandlePaint()
-- 
2.50.0

