]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/toplevel.cpp
Move MinGW builds to another machine as td165 is down.
[wxWidgets.git] / src / os2 / toplevel.cpp
index afa7e6754bb5dce3eae316d3fb34e11affc2f721..fde6f06b6f97f0ed5cb42bc6d67c635d8a41648c 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/toplevel.h"
+
 #ifndef WX_PRECOMP
     #include "wx/app.h"
-    #include "wx/toplevel.h"
     #include "wx/dialog.h"
     #include "wx/string.h"
     #include "wx/log.h"
@@ -35,9 +36,9 @@
     #include "wx/control.h"
     #include "wx/containr.h"        // wxSetFocusToChild()
     #include "wx/settings.h"
+    #include "wx/module.h"        // wxSetFocusToChild()
 #endif //WX_PRECOMP
 
-#include "wx/module.h"        // wxSetFocusToChild()
 #include "wx/os2/private.h"
 
 // ----------------------------------------------------------------------------
@@ -483,8 +484,8 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
      hFrame = ::WinCreateStdWindow( hParent
                                    ,ulStyleFlags          // frame-window style
                                    ,(PULONG)&lFlags       // window style
-                                   ,(PSZ)wxFrameClassName // class name
-                                   ,(PSZ)rsTitle.c_str()  // window title
+                                   ,wxString(wxFrameClassName).c_str() // class name
+                                   ,rsTitle.c_str()       // window title
                                    ,0L                    // default client style
                                    ,NULLHANDLE            // resource in executable file
                                    ,0                     // resource id
@@ -552,7 +553,7 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
     //
     if (nWidth == (int)CW_USEDEFAULT)
     {
-       //
+        //
         // The exact number doesn't matter, the dialog will be resized
         // again soon anyhow but it should be big enough to allow
         // calculation relying on "totalSize - clientSize > 0" work, i.e.
@@ -789,7 +790,7 @@ bool wxTopLevelWindowOS2::Show( bool bShow )
         ::WinEnableWindow(m_hFrame, TRUE);
 
         vEvent.SetEventObject(this);
-        GetEventHandler()->ProcessEvent(vEvent);
+        HandleWindowEvent(vEvent);
     }
     else
     {
@@ -964,7 +965,7 @@ bool wxTopLevelWindowOS2::ShowFullScreen( bool bShow,
 
         wxSize full( nWidth, nHeight );
         wxSizeEvent vEvent( full, GetId() );
-        GetEventHandler()->ProcessEvent(vEvent);
+        HandleWindowEvent(vEvent);
         return true;
     }
     else
@@ -994,13 +995,6 @@ bool wxTopLevelWindowOS2::ShowFullScreen( bool bShow,
 // wxTopLevelWindowOS2 misc
 // ----------------------------------------------------------------------------
 
-void wxTopLevelWindowOS2::SetIcon(
-  const wxIcon&                     rIcon
-)
-{
-    SetIcons(wxIconBundle(rIcon));
-} // end of wxTopLevelWindowOS2::SetIcon
-
 void wxTopLevelWindowOS2::SetIcons(
   const wxIconBundle&               rIcons
 )
@@ -1010,9 +1004,9 @@ void wxTopLevelWindowOS2::SetIcons(
     //
     wxTopLevelWindowBase::SetIcons(rIcons);
 
-    const wxIcon&                   vIcon = rIcons.GetIcon(wxSize(32, 32));
+    const wxIcon& vIcon = rIcons.GetIconOfExactSize(32);
 
-    if (vIcon.Ok() && vIcon.GetWidth() == 32 && vIcon.GetHeight() == 32)
+    if (vIcon.Ok())
     {
         ::WinSendMsg( m_hFrame
                      ,WM_SETICON