Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Opening a new window, C++

  • 06-05-2004 09:39AM
    #1
    Registered Users, Registered Users 2 Posts: 285 ✭✭


    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, Registered Users 2 Posts: 285 ✭✭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.


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


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


  • Registered Users, Registered Users 2 Posts: 285 ✭✭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