X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd3f686c274a264e89ea97505350a82c1134f307..2004484f9b139978e86c3e9e102001a46f493576:/src/msw/control.cpp?ds=sidebyside diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 297d81e8fb..6c1cbf8c8d 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -21,10 +21,13 @@ #endif #ifndef WX_PRECOMP +#include "wx/event.h" #include "wx/app.h" #include "wx/dcclient.h" #endif +#include "wx/control.h" + #include "wx/msw/private.h" #if defined(__WIN95__) && !defined(__GNUWIN32__) @@ -61,7 +64,7 @@ wxControl::~wxControl(void) wxWindow *parent = (wxWindow *)GetParent(); if (parent) { - if (parent->GetDefaultItem() == this) + if (parent->GetDefaultItem() == (wxButton*) this) parent->SetDefaultItem(NULL); } }