Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - SetActiveView
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetActiveView

 Post Reply Post Reply
Author
Message
gmail View Drop Down
Groupie
Groupie


Joined: 24 February 2008
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote gmail Quote  Post ReplyReply Direct Link To This Post Topic: SetActiveView
    Posted: 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?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.