// Destructor
wxWindow::~wxWindow()
{
- // Remove potential dangling pointer
- if (GetParent() && GetParent()->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxPanel* panel = (wxPanel*) GetParent();
- if (panel->GetLastFocus() == this)
- panel->SetLastFocus((wxWindow*) NULL);
- }
-
m_isBeingDeleted = TRUE;
// first of all, delete the things on which nothing else depends
wxWindow *parent = GetParent();
if ( parent && parent->IsKindOf(CLASSINFO(wxPanel)) )
{
- ((wxPanel *)parent)->SetLastFocus(this);
+ ((wxPanel *)parent)->SetLastFocus(GetId());
}
wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId);
long wxWindow::MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam)
{
- switch (wParam)
+ switch (wParam & 0xFFFFFFF0)
{
case SC_MAXIMIZE:
{