#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"
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,
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
}
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,
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
}
}
}