]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/toplevel.cpp
Font change for OS/2 to a smaller font.
[wxWidgets.git] / src / os2 / toplevel.cpp
index ced8e43b349d336ac0013ffbe76246ecf33c5e55..0362889309e826db4558c0fb7567bbe4424cede6 100644 (file)
@@ -35,6 +35,7 @@
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/frame.h"
+    #include "wx/control.h"
 #endif //WX_PRECOMP
 
 #include "wx/os2/private.h"
@@ -52,8 +53,9 @@
 wxWindowList wxModelessWindows;
 
 // the name of the default wxWindows class
-extern const wxChar* wxCanvasClassName;
-extern const wxChar* wxFrameClassName;
+extern void          wxAssociateWinWithHandle( HWND         hWnd
+                                              ,wxWindowOS2* pWin
+                                             );
 
 // ============================================================================
 // wxTopLevelWindowMSW implementation
@@ -196,15 +198,15 @@ bool wxTopLevelWindowOS2::CreateDialog(
     }
 
     HWND                            hWndDlg;
-    HWND                            hWndParent;
+    HWND                            hWndOwner;
 
     if (pParent)
-        hWndParent = GetHwndOf(pParent);
+        hWndOwner = GetHwndOf(pParent);
     else
-        hWndParent = HWND_DESKTOP;
+        hWndOwner = HWND_DESKTOP;
 
-    hWndDlg = ::WinLoadDlg( hWndParent
-                           ,hWndParent
+    hWndDlg = ::WinLoadDlg( HWND_DESKTOP
+                           ,hWndOwner
                            ,(PFNWP)wxDlgProc
                            ,NULL
                            ,(ULONG)ulDlgTemplate
@@ -275,10 +277,6 @@ bool wxTopLevelWindowOS2::CreateDialog(
                       ,nHeight
                       ,SWP_MOVE | SWP_SIZE | SWP_ZORDER | SWP_SHOW
                      );
-    if (!rsTitle.IsNull())
-    {
-        ::WinSetWindowText(GetHwnd(), rsTitle.c_str());
-    }
     SubclassWin(m_hWnd);
     return TRUE;
 } // end of wxTopLevelWindowOS2::CreateDialog
@@ -529,6 +527,15 @@ void wxTopLevelWindowOS2::AlterChildPos()
     ::WinQueryWindowPos(GetHwnd(), &m_vSwpClient);
 } // end of wxTopLevelWindowOS2::AlterChildPos
 
+void wxTopLevelWindowOS2::UpdateInternalSize(
+  wxWindow*                         pChild
+, int                               nHeight
+)
+{
+    pChild->MoveChildren(m_vSwpClient.cy - nHeight);
+    ::WinQueryWindowPos(GetHwnd(), &m_vSwpClient);
+} // end of wxTopLevelWindowOS2::UpdateInternalSize
+
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowOS2 client size
 // ----------------------------------------------------------------------------