|
-
April 27th, 1999, 03:32 PM
#1
CDocument::GetPathName()
I need to call the CDocument::GetPathName() from my CEditView class. How do I do this? Everytime I try this the compiler gives me an error:
illegal call of non-static member function
I am trying to do it like this:
CString strReturn;
strReturn = CDocument::GetPathName();
What is the function GetPathName? Protected? How do I use this function from another class? Thanks for your help.
Todd
[email protected]
-
April 27th, 1999, 05:31 PM
#2
Re: CDocument::GetPathName()
Hi, Todd
What seems to be happening here is that you must call it in a different way: you must obtain a pointer to the active document (something like GetDocument(), I don't remember) ant do like this:
CDocument *p = GetDocument() (check the correct call!)
CString strReturn;
strReturn = p->GetPathName();
That should work. :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|