void CActivityView::OnPopupSwitchtoworld() { CMUSHclientDoc* pDoc = GetSelectedWorld (); if (!pDoc) return; for(POSITION pos=pDoc->GetFirstViewPosition();pos!=NULL;) { CView* pView = pDoc->GetNextView(pos); if (pView->IsKindOf(RUNTIME_CLASS(CSendView))) { CSendView* pmyView = (CSendView*)pView; if (pmyView->GetParentFrame ()->IsIconic ()) pmyView->GetParentFrame ()->ShowWindow (SW_RESTORE); pmyView->GetParentFrame ()->ActivateFrame (); pmyView->m_owner_frame->SetActiveView(pmyView); break; } } } // end of CActivityView::OnPopupSwitchtoworld
void CMUSHclientDoc::SetWorldWindowStatus(short Parameter) { CFrameWnd* pParent = NULL; for(POSITION pos=GetFirstViewPosition();pos!=NULL;) { CView* pView = GetNextView(pos); if (pView->IsKindOf(RUNTIME_CLASS(CSendView))) { CSendView* pmyView = (CSendView*)pView; pParent = pmyView->GetParentFrame (); break; } } if (pParent) { switch (Parameter) { case 1: pParent->ShowWindow(SW_SHOWMAXIMIZED); break; case 2: pParent->ShowWindow(SW_MINIMIZE); break; case 3: pParent->ShowWindow(SW_RESTORE); break; case 4: pParent->ShowWindow(SW_SHOWNORMAL); break; } // end of switch } // have parent } // end of CMUSHclientDoc::SetWorldWindowStatus
// warning - different in Lua BSTR CMUSHclientDoc::GetWorldWindowPositionX(short Which) { CString strResult; int i = 0; CWindowPlacement wp; for(POSITION pos=GetFirstViewPosition();pos!=NULL;) { CView* pView = GetNextView(pos); if (pView->IsKindOf(RUNTIME_CLASS(CSendView))) { CSendView* pmyView = (CSendView*)pView; i++; if (i != Which) continue; // wrong one pmyView->GetParentFrame ()->GetWindowPlacement(&wp); windowPositionHelper (strResult, wp.rcNormalPosition); break; } } return strResult.AllocSysString(); } // end of CMUSHclientDoc::GetWorldWindowPositionX
void CMUSHclientDoc::MoveWorldWindowX(long Left, long Top, long Width, long Height, short Which) { int i = 0; for(POSITION pos=GetFirstViewPosition();pos!=NULL;) { CView* pView = GetNextView(pos); if (pView->IsKindOf(RUNTIME_CLASS(CSendView))) { CSendView* pmyView = (CSendView*)pView; i++; if (i != Which) continue; // wrong one pmyView->GetParentFrame ()->MoveWindow (Left, Top, Width, Height); break; } } } // end of CMUSHclientDoc::MoveWorldWindowX
void CMUSHclientDoc::Activate() { for(POSITION pos=GetFirstViewPosition();pos!=NULL;) { CView* pView = GetNextView(pos); if (pView->IsKindOf(RUNTIME_CLASS(CSendView))) { CSendView* pmyView = (CSendView*)pView; if (pmyView->GetParentFrame ()->IsIconic ()) pmyView->GetParentFrame ()->ShowWindow (SW_RESTORE); pmyView->GetParentFrame ()->ActivateFrame (); pmyView->m_owner_frame->SetActiveView(pmyView); break; } // end of being a CSendView } } // end of CMUSHclientDoc::Activate