c++ - MDI MFC VC++ how to switch views within mainframe -


i making mdi application , , without using splitter document has multiple views. want change document view mainframe of application...

here doing , have outlookbar menu buttons, when user click buttons show cformview inside document child instead of popup dialog. dont know how change view mainframe menu handler has been written.

kindly suggest tip if know any...there more 5 different views , 4 of them cformview.

mainframe ->menuhandlerfunction (menu clicks)

menuhandlerfunction -> open new document new view based on cformview

(total 5 different cformview , handlers inside mainframe written)

i'm not sure how select view display, here code iterate through views of current document in mainframe:

edit: modified code mdi

cmdichildwnd *pchild = (cmdichildwnd*)getactiveframe();  // edit: added line cdocument *pdoc = pchild->getactivedocument();           // edit: added pchild-> position pos = pdoc->getfirstviewposition(); while (pos != null) {   cview* pview = getnextview(pos);     // if view want activate     //     pchild->setactiveview(pview);                 // edit: added pchild-> } 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -