1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with the reference to (CTreeCtrlEx)

Discussion in 'C' started by rag84dec, Jun 15, 2009.

  1. rag84dec

    rag84dec New Member

    Joined:
    Jul 17, 2007
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    0
    I have an MFC dialog which has a Tree(CTreeCtrlEx) structure where each node is a combo box.
    I want to have a "Cancel" button which will cancel the option chosen by the user and goes with
    the user chosen previosly.I have a cancel button but,as soon as the user changes the (CTreeCtrlEx)
    item,the values will be changed.

    Now all i want is to store the previous option and compared to DoModal return.and use the oprions
    accordingly.

    Currently, i am doing like this ,i have mentioned below
    OC_Dlg_PureMFC_Test_Options_c is a subclass of CTreeCtrlEx
    Code:
    
    
    OC_Dlg_PureMFC_Test_Options_c(m_Options).DoModal();  // m_Options is a reference...
    
    
    
    
    How will i save the previous m_Options?....Any idea?
    I tried doing the following ...


    Code:
    
    OC_TestOptions_Common_c *temp = new OC_TestOptions_Common_c(m_Options);
    OC_Dlg_PureMFC_Test_Options_c(m_Options).DoModal();  // m_Options is a reference...
    
    
    
    

    But i dont know how to turn it back to m_Options... can any one help me??
     

Share This Page