- msg = 0;
- }
-
- if ( msg )
- {
- ::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, lParam);
-
- return true;
- }
-
- // FIXME VZ: what does this test do??
- if (id >= 0xF000)
- {
- return false; // Get WndProc to call default proc
- }
-
- if ( IsMdiCommandId(id) )
- {
- wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
- while ( node )
- {
- wxWindow *child = node->GetData();
- if ( child->GetHWND() )
- {
- int childId = wxGetWindowId(child->GetHWND());
- if ( childId == (signed short)id )
- {
- ::SendMessage( GetWinHwnd(GetClientWindow()),
- WM_MDIACTIVATE,
- (WPARAM)child->GetHWND(), 0);
- return true;
- }
- }
- node = node->GetNext();
- }
- }
- else if ( m_parentFrameActive )
- {
- return ProcessCommand(id);
- }
- else if ( m_currentChild )
- {
- return m_currentChild->HandleCommand(id, cmd, hwnd);
- }
- else
- {
- // this shouldn't happen because it means that our messages are being
- // lost (they're not sent to the parent frame nor to the children)
- wxFAIL_MSG(wxT("MDI parent frame is not active, yet there is no active MDI child?"));