]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
do use the font in DoGetTextExtent()
[wxWidgets.git] / src / msw / toplevel.cpp
index a3b75ce292175cce5a25bc39373e7a4e91b1f49e..1d50568724b46cdf3b77c4a61d5b6f37ac0c7bf1 100644 (file)
@@ -27,7 +27,6 @@
 #include "wx/toplevel.h"
 
 #ifndef WX_PRECOMP
-    #include "wx/msw/missing.h"
     #include "wx/app.h"
     #include "wx/dialog.h"
     #include "wx/string.h"
     #if _WIN32_WCE < 400 || !defined(__WINCE_STANDARDSDK__)
         #include <aygshell.h>
     #endif
-    #include "wx/msw/wince/missing.h"
 #endif
 
 #include "wx/msw/winundef.h"
+#include "wx/msw/missing.h"
 
 #include "wx/display.h"
 
@@ -784,11 +783,10 @@ void wxTopLevelWindowMSW::SetLayoutDirection(wxLayoutDirection dir)
 // wxTopLevelWindowMSW geometry
 // ----------------------------------------------------------------------------
 
-void wxTopLevelWindowMSW::DoGetPosition(int *x, int *y) const
-{
-
 #ifndef __WXWINCE__
 
+void wxTopLevelWindowMSW::DoGetPosition(int *x, int *y) const
+{
     if ( IsIconized() )
     {
         WINDOWPLACEMENT wp;
@@ -824,15 +822,11 @@ void wxTopLevelWindowMSW::DoGetPosition(int *x, int *y) const
     }
     //else: normal case
 
-#endif // __WXWINCE__
-
     wxTopLevelWindowBase::DoGetPosition(x, y);
 }
 
 void wxTopLevelWindowMSW::DoGetSize(int *width, int *height) const
 {
-#ifndef __WXWINCE__
-
     if ( IsIconized() )
     {
         WINDOWPLACEMENT wp;
@@ -853,11 +847,11 @@ void wxTopLevelWindowMSW::DoGetSize(int *width, int *height) const
     }
     //else: normal case
 
-#endif
-
     wxTopLevelWindowBase::DoGetSize(width, height);
 }
 
+#endif // __WXWINCE__
+
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowMSW fullscreen
 // ----------------------------------------------------------------------------
@@ -983,25 +977,20 @@ wxString wxTopLevelWindowMSW::GetTitle() const
     return GetLabel();
 }
 
-void wxTopLevelWindowMSW::SetIcon(const wxIcon& icon)
-{
-    SetIcons( wxIconBundle( icon ) );
-}
-
 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) );
     }
 
-    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) );