![]()  | 
 
SetActiveView | 
 
    Post Reply  
   | 
  
| Author | |
   
   gmail  
   
   Groupie  
   Joined: 24 February 2008 Status: Offline Points: 45  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: SetActiveViewPosted: 23 September 2009 at 3:57pm  | 
 
| 
   
    
   I'm using your CXTPMDIFrameWnd derived CMainFrame class with multiple views in my application. If I open 4 different views and I wan't to set e.g. second view active I can't. Here's the snippet: 
   
  POSITION pos=NULL; pos=pApp->pIzvTemplate->GetFirstDocPosition(); pDoc=pApp->pIzvTemplate->GetNextDoc(pos); pos=pDoc->GetFirstViewPosition(); CView *pView=pDoc->GetNextView(pos); if(pView){ ((CMainFrame*)AfxGetMainWnd())->SetActiveView(pView,TRUE); } Not only it doesn't changes the active view, after exit it crashes (but that's irrelevant for this situation, I'll try to fix it later). And if I call GetActiveView() after SetActiveView() it returns the correct one - but it's not shown. I'm using XTP 12.1. So, how can we switch between views?  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |