From 0256cfeb6db72fb570ff043a2cdd214128b3ea2d Mon Sep 17 00:00:00 2001
From: David Webster <Dave.Webster@bhmi.com>
Date: Mon, 15 Jul 2002 21:50:34 +0000
Subject: [PATCH] Dialog processing updates and some timer fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/os2/app.cpp      | 12 ++++++++++++
 src/os2/toolbar.cpp  |  4 ++--
 src/os2/toplevel.cpp |  7 ++++---
 src/os2/wx23.def     | 15 +++++++++++----
 4 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/src/os2/app.cpp b/src/os2/app.cpp
index 39eeae0c8b..1e1a4a4456 100644
--- a/src/os2/app.cpp
+++ b/src/os2/app.cpp
@@ -422,6 +422,18 @@ bool wxApp::RegisterWindowClasses(
         wxLogLastError(sError);
         return FALSE;
     }
+    if (!::WinRegisterClass( vHab
+                            ,wxCanvasClassNameNR
+                            ,wxWndProc
+                            ,CS_HITTEST | CS_SYNCPAINT
+                            ,sizeof(ULONG)
+                           ))
+    {
+        vError = ::WinGetLastError(vHab);
+        sError = wxPMErrorToStr(vError);
+        wxLogLastError(sError);
+        return FALSE;
+    }
     return TRUE;
 } // end of wxApp::RegisterWindowClasses
 
diff --git a/src/os2/toolbar.cpp b/src/os2/toolbar.cpp
index 2cf452ba77..7975660d48 100644
--- a/src/os2/toolbar.cpp
+++ b/src/os2/toolbar.cpp
@@ -976,7 +976,7 @@ void wxToolBar::OnMouseEvent(
                 m_pToolTip = new wxToolTip(pTool->GetShortHelp());
                 m_vXMouse = (wxCoord)vPoint.x;
                 m_vYMouse = (wxCoord)vPoint.y;
-                m_vToolTimer.Start(3000L, TRUE);
+                m_vToolTimer.Start(1000L, TRUE);
             }
             if (!pTool->IsToggled())
                 RaiseTool(pTool);
@@ -1447,7 +1447,7 @@ void wxToolBar::OnTimer (
 
         m_pToolTip->DisplayToolTipWindow(vPos);
         m_vToolTimer.Stop();
-        m_vToolExpTimer.Start(3000L, TRUE);
+        m_vToolExpTimer.Start(4000L, TRUE);
     }
     else if (rEvent.GetId() == m_vToolExpTimer.GetTimerId())
     {
diff --git a/src/os2/toplevel.cpp b/src/os2/toplevel.cpp
index 0b4219617a..a7a66c4f1e 100644
--- a/src/os2/toplevel.cpp
+++ b/src/os2/toplevel.cpp
@@ -83,9 +83,10 @@ MRESULT EXPENTRY wxDlgProc( HWND WXUNUSED(hWnd)
         case WM_INITDLG:
             //
             // For this message, returning TRUE tells system to set focus to
-            // the first control in the dialog box, but as we set the focus
-            // ourselves, we return FALSE from here as well, so fall through
+            // the first control in the dialog box, but we set the focus
+            // ourselves, however in OS/2 we must return true to enable the dialog
             //
+            return (MRESULT)TRUE;
         default:
             //
             // For all the other ones, FALSE means that we didn't process the
@@ -396,7 +397,7 @@ bool wxTopLevelWindowOS2::CreateDialog(
                       ,nY
                       ,nWidth
                       ,nHeight
-                      ,SWP_MOVE | SWP_SIZE | SWP_ZORDER | SWP_SHOW
+                      ,SWP_MOVE | SWP_SIZE | SWP_ZORDER | SWP_SHOW | SWP_ACTIVATE
                      );
     ::WinQueryWindowPos(GetHwnd(), GetSwp());
     m_hFrame = m_hWnd;
diff --git a/src/os2/wx23.def b/src/os2/wx23.def
index 92f700571a..05169b8ed5 100644
--- a/src/os2/wx23.def
+++ b/src/os2/wx23.def
@@ -4,7 +4,7 @@ DATA MULTIPLE NONSHARED READWRITE LOADONCALL
 CODE LOADONCALL
 
 EXPORTS
-;From library:  H:\Dev\Wx2\WxWindows\Lib\wx.lib
+;From library:  H:\DEV\WX2\WXWINDOWS\LIB\wx.lib
   ;From object file:  dummy.cpp
     ;PUBDEFs (Symbols available from object file):
       wxDummyChar
@@ -1153,6 +1153,8 @@ EXPORTS
       OnNewDocument__10wxDocumentFv
       ;wxView::OnCreatePrintout()
       OnCreatePrintout__6wxViewFv
+      ;wxDocument::NotifyClosing()
+      NotifyClosing__10wxDocumentFv
       ;wxDocManager::GetNoHistoryFiles() const
       GetNoHistoryFiles__12wxDocManagerCFv
       ;wxFileHistory::AddFilesToMenu()
@@ -1805,6 +1807,7 @@ EXPORTS
       ;wxMouseEvent::Assign(const wxMouseEvent&)
       Assign__12wxMouseEventFRC12wxMouseEvent
       wxEVT_SCROLL_LINEUP
+      wxEVT_SCROLL_ENDSCROLL
       wxEVT_PAINT
       wxEVT_NULL
       wxEVT_NC_RIGHT_UP
@@ -4658,12 +4661,14 @@ EXPORTS
       Exists__9wxProcessFi
       ;wxConstructorForwxProcess()
       wxConstructorForwxProcess__Fv
-      ;wxProcess::Init(wxEvtHandler*,int,unsigned long)
-      Init__9wxProcessFP12wxEvtHandleriUl
-      __vft9wxProcess8wxObject
       ;wxProcess::Kill(int,wxSignal)
       Kill__9wxProcessFi8wxSignal
+      __vft9wxProcess8wxObject
+      ;wxProcess::Open(const wxString&,int)
+      Open__9wxProcessFRC8wxStringi
       wxEVT_END_PROCESS
+      ;wxProcess::Init(wxEvtHandler*,int,int)
+      Init__9wxProcessFP12wxEvtHandleriT2
       ;wxProcess::~wxProcess()
       __dt__9wxProcessFv
       ;wxConstructorForwxProcessEvent()
@@ -6616,6 +6621,8 @@ EXPORTS
       sm_classwxVariantDataChar__17wxVariantDataChar
       ;wxVariant::operator==(void*) const
       __eq__9wxVariantCFPv
+      ;wxVariant::NullList()
+      NullList__9wxVariantFv
       ;wxVariant::GetList() const
       GetList__9wxVariantCFv
       ;wxVariant::GetCount() const
-- 
2.50.0

