#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
-#include <commctrl.h>
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__))
+ #include <commctrl.h>
#endif
IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
const wxString& label,
WXDWORD exstyle)
{
- // VZ: if someone could put a comment here explaining what exactly this is
- // needed for, it would be nice...
- bool want3D;
+ // want3D tells us whether or not the style specified a 3D border.
+ // If so, under WIN16 we can use Ctl3D to give it an appropriate style.
+ // Sometimes want3D is used to indicate that the non-extended style should have
+ // WS_BORDER.
+ bool want3D = TRUE;
// if no extended style given, determine it ourselves
if ( exstyle == (WXDWORD)-1 )
exstyle = GetExStyle(style, &want3D);
}
- // all controls have these childs (wxWindows creates all controls visible
+ // all controls have these styles (wxWindows creates all controls visible
// by default)
style |= WS_CHILD | WS_VISIBLE;
if ( !m_hWnd )
{
-#ifdef __WXDEBUG__
- wxLogError(wxT("Failed to create a control of class '%s'"), classname);
-#endif // DEBUG
+ wxLogDebug(wxT("Failed to create a control of class '%s'"), classname);
+ wxFAIL_MSG(_T("something is very wrong"));
return FALSE;
}
#if WXWIN_COMPATIBILITY
if ( m_callback )
{
- (void)(*m_callback)(this, event);
+ (void)(*m_callback)(*this, event);
return TRUE;
}
else
SetBkMode(hdc, OPAQUE);
- const wxColour& colBack = GetBackgroundColour();
+ wxColour colBack = GetBackgroundColour();
+
::SetBkColor(hdc, wxColourToRGB(colBack));
::SetTextColor(hdc, wxColourToRGB(GetForegroundColour()));