In CPropertiesWnd (comming from CDockablePane, infact the same one from MFC
features pack), i can do CTestDoc* pDoc (Test is my app name)...
...but cant do CTestDoc* pDoc = GetDocument()
What can I do instead?
AfxGetApp()->GetFirstDocTemplatePosition
...and then
CDocTemplate::GetFirstDocPosition and GetNextDoc
"Teddy" <Te...@discussions.microsoft.com> wrote in message
news:AB802C0A-A107-4497...@microsoft.com...
--
Scott McPhillips [VC++ MVP]
Exact code used (in case some nabs like me have same difficulties. "Test" is
my prj name):
CTestDoc* pDoc;
CDocTemplate* pDocTemplate;
POSITION pos;
pos = AfxGetApp()->GetFirstDocTemplatePosition();
pDocTemplate = AfxGetApp()->GetNextDocTemplate(pos);
pos = pDocTemplate->GetFirstDocPosition();
pDoc = (CTestDoc*) pDocTemplate->GetNextDoc(pos);
"Scott McPhillips [MVP]" wrote:
> The CWinApp class maintains a list of CDocuments. So you can get the
> document(s) by calling
>
> AfxGetApp()->GetFirstDocTemplatePosition
>
> ....and then
>
> CDocTemplate::GetFirstDocPosition and GetNextDoc
>
>
> "Teddy" <Te...@discussions.microsoft.com> wrote in message
> news:AB802C0A-A107-4497...@microsoft.com...
> > Hi, Pls hlp me with this one:
> >
> > In CPropertiesWnd (comming from CDockablePane, infact the same one from
> > MFC
> > features pack), i can do CTestDoc* pDoc (Test is my app name)...
> > ...but cant do CTestDoc* pDoc = GetDocument()
> >
> > What can I do instead?
>
> --
> Scott McPhillips [VC++ MVP]
>
> .
>