- wxActivateEvent event( wxEVT_ACTIVATE, TRUE, child->GetId() );
- event.SetEventObject( child);
- child->GetEventHandler()->ProcessEvent( event );
+ wxNode *node = client_window->GetChildren().First();
+ while (node)
+ {
+ wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
+ if (child_frame->m_page == page)
+ {
+ child = child_frame;
+ break;
+ }
+ node = node->Next();
+ }
+
+ if (!child)
+ return;
+
+ wxActivateEvent event2( wxEVT_ACTIVATE, TRUE, child->GetId() );
+ event2.SetEventObject( child);
+ child->GetEventHandler()->ProcessEvent( event2 );