CDocument::GetPathName() returns empty string for relative path
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CDocument::GetPathName() returns empty string for relative path

  1. #1
    Join Date
    Jan 2012
    Posts
    0

    CDocument::GetPathName() returns empty string for relative path

    I have a requirement where i need to change a relative path to an absolute path when saving a file thru "Save As" . In order to do that i need to get the entire path of the file name of the source path.

    The CDocument::GetPathName() should return the absolute path name. But it returns an empty string.
    This happens only for the first time. Second time onwards the GetPathName() returns the correct absolute path of the source.

    When it happens for the first time, the business logic needs to be executed based on the absolute path of the source. But since it returns the empty string i am unable to proceed

    Can anyone help me with this regard?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,517

    Re: CDocument::GetPathName() returns empty string for relative path

    Well do you know the "default" directory where your files are about to be saved?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center