Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Opening a new window, C++

Options
  • 06-05-2004 9:39am
    #1
    Registered Users Posts: 293 ✭✭


    Morning all,

    I have a program (written in Visual C++) which displays graphs.
    When you open a txt document it displays the information in the form graphs (in a window).
    Then I carry out some maths on this txt file to reduce data etc.
    This new data is saved as Water-man.txt and I would like a new graph to be displayed in a new window when a button is clicked.
    Here is what I have tried:

    void CChildFrame::OnDoAnalysis()
    {
    CGuardianDoc *pDoc = GetGuardianDoc();
    ASSERT_VALID(pDoc);
    if(NULL != pDoc)
    {
    if(TRUE == Maths)
    {
    Maths = FALSE;
    pDoc->Maths = FALSE;
    pDoc->UpdateAllViews(NULL,2);
    MessageBox("Data is now analysied");
    CDal->OnOpenDocument("C:/Program Files/Water-man.txt");
    }
    }
    }

    In another class I have a function called OnOpenDocument. I had a trace statement in the code aswell so I know that I am making it into the If(TRUE == m_bAnalysis) loop.
    Have also placed Trace statement in OnOpenDocument function to indicate to me that I have got from OnDoAnalysis to OnOpenDocument.

    Also if I open the Water-man file from the menu bar it displays the graphs.

    Any ideas??

    Cheeers,
    Water-man (or woman)


Comments

  • Registered Users Posts: 293 ✭✭water-man


    note:
    "In another class I have a function called OnOpenDocument. I had a trace statement in the code aswell so I know that I am making it into the If(TRUE == m_bAnalysis) loop."

    Should read:
    In another class I have a function called OnOpenDocument. I had a trace statement in the code aswell so I know that I am making it into the If(TRUE == maths) loop.


  • Moderators, Music Moderators Posts: 1,481 Mod ✭✭✭✭satchmo


    I may have missed something, but is there a question in there somewhere?!


  • Registered Users Posts: 293 ✭✭water-man


    Hello,

    Sorry for any confusion.
    I am just wondering if what I have done looks crrect to you guys. And if you could see from code supplied why a new window does not open.

    Or perhaps somone knows a way to open a new window ;)

    Water-man


Advertisement