Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabControl Adding Items..Continued!

Status
Not open for further replies.

ronnyjljr

IS-IT--Management
Nov 23, 2003
249
US
Haha,

I know you are all ready to kill me, but here goes again!

Ok, I have a Tabcontrol created like posted in last message, and I have a tab on it. The tab's name is history. Everything works great on tab, all the dialogs come up the way they are supposed to.

My question is.. I need to get a pointer from the Embedded history dialog to the main application window, how do I do that?

MainApplication->Details->HistoryDialog

Need a pointer from HistoryDialog to MainApplication
I can't seem to get it to work, the compiler throws up on me everytime I include the details.h file in the history.h, and then tried CDetails *mParent; but the compiler keeps throwing up (.Net 2003)

Thanks again,
Ron

/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...
 
Here are some things I have tried.

CMRDlg Old = new CMRDlg(GetParent()->GetParent()->GetParent());

CMDlg Old= new CMRDlg(this->mParent->mParent->GetParent());
(This is when the history Parent is just a CWnd not a CDetail)

Ha, this sounds confusing =)



/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...
 
If what you are trying to get is the main app, you can use AfxGetApp().
 
I got it! =)

Darned compiler seem to be acting funny. I removed the header files from the History.h file and it worked =)

Yay!

/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top