Re: More CChildFrame questions

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Jun 21, 12:08 pm, "GT" <ContactGT_remo...@xxxxxxxxxxx> wrote:
"David Wilkinson" <no-re...@xxxxxxxxxxxx> wrote in message

news:%23tmfzbBtHHA.2752@xxxxxxxxxxxxxxxxxxxxxxx

GT wrote:

Fair enough, but see my other post in the other thread. The view does
some complex, lengthy maths when it is created, which I would rather just
do once and 'assign' the view to a childframe, then destroy the
childframe, but holding onto my view, then assign the view to another
frame later.

If this is the wrong approach, then any suggestions would be gratefully
appreciated.

GT:

Ajay has given you the correct solution in the other thread. Don't keep
the computed information in the view class itself.

I understand this now. So should I also move all the visual settings and
configuration data to the document for all my classes too - will end up with
a complicated document and some annoyingly long variable names!

No, you shouldnt move anything related to view to the doc. If its view
specific, you should keep it in the view. Keep in mind that you can
have multiple views on a document.

---
Ajay




.



Relevant Pages

  • Re: Single Document MDI-like interface questions
    ... I've thought of posting a message to the MainFrame when the ChildFrame is ... destroyed, so it can destroy the CMultidocTemplate and set it to NULL. ... Doctemplate shouldnt be destroyed after the view is closed. ...
    (microsoft.public.vc.mfc)
  • Re: Creating a CChildFrame
    ... How can I create an instance of a CChildFrame ... OnCreate of your frame and create your own view which is different ... assign to a new childframe later. ... view, because at the moment I create a childframe, then have to destroy the ...
    (microsoft.public.vc.mfc)
  • Re: More CChildFrame questions
    ... some complex, lengthy maths when it is created, which I would rather just ... do once and 'assign' the view to a childframe, then destroy the ... childframe, but holding onto my view, then assign the view to another ... a complicated document and some annoyingly long variable names! ...
    (microsoft.public.vc.mfc)
  • Re: Creating a CChildFrame
    ... How can I create an instance of a CChildFrame ... View gets created in CMDIChildWnd's OnCreate ... assign to a new childframe later. ... view, because at the moment I create a childframe, then have to destroy the ...
    (microsoft.public.vc.mfc)
  • Re: More CChildFrame questions
    ... the view may do the maths, but store the RESULT in the DOCUMENT!!!!! ... I would rethink the design. ... and 'assign' the view to a childframe, then destroy the childframe, but ...
    (microsoft.public.vc.mfc)