Using CView as a child window and CCmdUI
-
Hi! Let me describe what I have and then I'll explain my problem: I have a SDI application which has a CFormView. In this CFormView I have several CDialog derived classes defined as child windows. In one of these CDialog I have a CView derived child window (a CHtmlEditView to be accurate). The problem is that whenever this view has focus my menus (through CCmdUI* pCmdUI) do not get updated anymore... Ideally, I would like the formview to be in charge of the menu update. After all it's only incidental that the chid window is a view... I suspect I need to have a dab at CCreateContext... but my view (which is part of a control I have not programmed although I have the source code - it's from here and I'd rather not change the code so I can use the future updates) has been create by Create and not CreateView. So here are my questions: a) can I ask that a view not to mess up with the CCmdUI* pCmdUI and let a parent view deal with it? b) if a) not possible, can I assign a CCreateContext to a view after its creation? c) if a ) and b) are not possible, can someone pay me a round of drinks so I can forget my dreams of good design and encapsulation? Thanks in advance