#include "wx/button.h"
#include "wx/brush.h"
#include "wx/panel.h"
+ #include "wx/bmpbuttn.h"
#endif
#include "wx/msw/private.h"
const wxValidator& validator,
const wxString& name)
{
- if ( !CreateBase(parent, id, pos, size, style, name) )
+ if ( !CreateBase(parent, id, pos, size, style, validator, name) )
return FALSE;
SetValidator(validator);
SendMessage(GetWinHwnd(parent), DM_SETDEFID, m_windowId, 0L);
}
- if ( btnOldDefault )
+ // this doesn't work with bitmap buttons because it also removes the
+ // "ownerdrawn" style...
+ if ( btnOldDefault && !wxDynamicCast(btnOldDefault, wxBitmapButton) )
{
// remove the BS_DEFPUSHBUTTON style from the other button
long style = GetWindowLong(GetHwndOf(btnOldDefault), GWL_STYLE);