Document access from CXTPFrameWnd in SDI |
Post Reply |
Author | |
VAGB
Newbie Joined: 23 November 2004 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 23 November 2004 at 12:44pm |
Hello!: Here is my question: When you are using the CXTPFrameWnd class as the base class from which CMainFrame is derived in a SDI application, ¿is the access to the document class lost? I mean, I´ve noticed there is no longer GetActiveDocument() function available. With CXTPMDIFrameWnd everything works fine, but I need a SDI application instead of a MDI one. I have data stored in the CDocument class and I need to access to that data from the MainFrame, but as I´ve derived this from CXTPFrameWnd in order to use Docking Panes on it, I have lost all the functions provided by CFrameWnd. I hope you are so kind to help me, thanks. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Give me your non-working piece of code. I added CDocument* pDocument = GetActiveDocument(); in void CMainFrame::OnCustomize() of GUI_ACDSee sample and it works.
Check may be you have class CMainFrame : CXTPFrameWnd instead of class CMainFrame : public CXTPFrameWnd
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
VAGB
Newbie Joined: 23 November 2004 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Thank you very much! Indeed the problem was derived from a bad interpretation of the code. As CXTPFrameWnd derives from CXTPFrameWndBase as a template Visual C++ does not show the GetActiveDocument() function on its help devices, but if you use it... well, there it is. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |