]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/topluniv.cpp
fixing compilo for 10.5
[wxWidgets.git] / src / univ / topluniv.cpp
index e14b122ab585849a4fa342c47205aeec45d32170..a7c87890d6e14d252597623532a6ed10f7b3d09f 100644 (file)
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
+#include "wx/toplevel.h"
+
 #ifndef WX_PRECOMP
     #include "wx/dcclient.h"
     #include "wx/settings.h"
+    #include "wx/bitmap.h"
+    #include "wx/image.h"
 #endif
 
-#include "wx/toplevel.h"
 #include "wx/univ/renderer.h"
-#include "wx/bitmap.h"
-#include "wx/image.h"
 #include "wx/cshelp.h"
 #include "wx/evtloop.h"
 
@@ -96,8 +97,7 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
                    wxSYSTEM_MENU | wxRESIZE_BORDER | wxFRAME_TOOL_WINDOW |
                    wxRESIZE_BORDER);
         style |= wxSIMPLE_BORDER;
-        SetExtraStyle(exstyleOrig &
-                      ~(wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP));
+        SetExtraStyle(exstyleOrig & ~wxWS_EX_CONTEXTHELP);
     }
 
     if ( !wxTopLevelWindowNative::Create(parent, id, title, pos,
@@ -153,7 +153,7 @@ long wxTopLevelWindow::GetDecorationsStyle() const
                 style |= wxTOPLEVEL_BUTTON_MAXIMIZE;
         }
 #if wxUSE_HELP
-        if ( m_exStyle & (wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP))
+        if ( m_exStyle & wxWS_EX_CONTEXTHELP)
             style |= wxTOPLEVEL_BUTTON_HELP;
 #endif
     }
@@ -239,12 +239,7 @@ void wxTopLevelWindow::OnNcPaint(wxNcPaintEvent& event)
     else
     {
         // get the window rect
-        wxRect rect;
-        wxSize size = GetSize();
-        rect.x =
-        rect.y = 0;
-        rect.width = size.x;
-        rect.height = size.y;
+        wxRect rect(GetSize());
 
         wxWindowDC dc(this);
         m_renderer->DrawFrameTitleBar(dc, rect,
@@ -309,12 +304,14 @@ void wxTopLevelWindow::SetIcons(const wxIconBundle& icons)
                 m_titlebarIcon = wxNullIcon;
             else if ( bmp1.GetWidth() == size.x && bmp1.GetHeight() == size.y )
                 m_titlebarIcon = icon;
+#if wxUSE_IMAGE
             else
             {
                 wxImage img = bmp1.ConvertToImage();
                 img.Rescale(size.x, size.y);
                 m_titlebarIcon.CopyFromBitmap(wxBitmap(img));
             }
+#endif // wxUSE_IMAGE
         }
     }
 }