]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
Rework the wxCusor ctor taking wx stock number to provide as many cursors as
[wxWidgets.git] / src / msw / toplevel.cpp
index cc9f0bcc87ff4add0812c721ea050faf8faa2f0d..272d3c15bf5c656e8b50d508862bdc7c71276e32 100644 (file)
@@ -27,7 +27,6 @@
 #include "wx/toplevel.h"
 
 #ifndef WX_PRECOMP
 #include "wx/toplevel.h"
 
 #ifndef WX_PRECOMP
-    #include "wx/msw/missing.h"
     #include "wx/app.h"
     #include "wx/dialog.h"
     #include "wx/string.h"
     #include "wx/app.h"
     #include "wx/dialog.h"
     #include "wx/string.h"
     #if _WIN32_WCE < 400 || !defined(__WINCE_STANDARDSDK__)
         #include <aygshell.h>
     #endif
     #if _WIN32_WCE < 400 || !defined(__WINCE_STANDARDSDK__)
         #include <aygshell.h>
     #endif
-    #include "wx/msw/wince/missing.h"
 #endif
 
 #include "wx/msw/winundef.h"
 #endif
 
 #include "wx/msw/winundef.h"
+#include "wx/msw/missing.h"
 
 #include "wx/display.h"
 
 
 #include "wx/display.h"
 
@@ -480,7 +479,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
 
     if ( !title.empty() )
     {
 
     if ( !title.empty() )
     {
-        ::SetWindowText(GetHwnd(), title);
+        ::SetWindowText(GetHwnd(), title.wx_str());
     }
 
     SubclassWin(m_hWnd);
     }
 
     SubclassWin(m_hWnd);
@@ -508,7 +507,7 @@ bool wxTopLevelWindowMSW::CreateFrame(const wxString& title,
         exflags |= WS_EX_LAYOUTRTL;
 #endif
 
         exflags |= WS_EX_LAYOUTRTL;
 #endif
 
-    return MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags);
+    return MSWCreate(wxCanvasClassName, title.wx_str(), pos, sz, flags, exflags);
 }
 
 bool wxTopLevelWindowMSW::Create(wxWindow *parent,
 }
 
 bool wxTopLevelWindowMSW::Create(wxWindow *parent,
@@ -784,6 +783,8 @@ void wxTopLevelWindowMSW::SetLayoutDirection(wxLayoutDirection dir)
 // wxTopLevelWindowMSW geometry
 // ----------------------------------------------------------------------------
 
 // wxTopLevelWindowMSW geometry
 // ----------------------------------------------------------------------------
 
+#ifndef __WXWINCE__
+
 void wxTopLevelWindowMSW::DoGetPosition(int *x, int *y) const
 {
     if ( IsIconized() )
 void wxTopLevelWindowMSW::DoGetPosition(int *x, int *y) const
 {
     if ( IsIconized() )
@@ -849,6 +850,8 @@ void wxTopLevelWindowMSW::DoGetSize(int *width, int *height) const
     wxTopLevelWindowBase::DoGetSize(width, height);
 }
 
     wxTopLevelWindowBase::DoGetSize(width, height);
 }
 
+#endif // __WXWINCE__
+
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowMSW fullscreen
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowMSW fullscreen
 // ----------------------------------------------------------------------------
@@ -974,25 +977,20 @@ wxString wxTopLevelWindowMSW::GetTitle() const
     return GetLabel();
 }
 
     return GetLabel();
 }
 
-void wxTopLevelWindowMSW::SetIcon(const wxIcon& icon)
-{
-    SetIcons( wxIconBundle( icon ) );
-}
-
 void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
 {
     wxTopLevelWindowBase::SetIcons(icons);
 
 #if !defined(__WXMICROWIN__)
 void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
 {
     wxTopLevelWindowBase::SetIcons(icons);
 
 #if !defined(__WXMICROWIN__)
-    const wxIcon& sml = icons.GetIcon( wxSize( 16, 16 ) );
-    if( sml.Ok() && sml.GetWidth() == 16 && sml.GetHeight() == 16 )
+    const wxIcon& sml = icons.GetIconOfExactSize(16);
+    if( sml.Ok() )
     {
         ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_SMALL,
                        (LPARAM)GetHiconOf(sml) );
     }
 
     {
         ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_SMALL,
                        (LPARAM)GetHiconOf(sml) );
     }
 
-    const wxIcon& big = icons.GetIcon( wxSize( 32, 32 ) );
-    if( big.Ok() && big.GetWidth() == 32 && big.GetHeight() == 32 )
+    const wxIcon& big = icons.GetIconOfExactSize(32);
+    if( big.Ok() )
     {
         ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_BIG,
                        (LPARAM)GetHiconOf(big) );
     {
         ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_BIG,
                        (LPARAM)GetHiconOf(big) );