none
loading file at runtime (path)

    Question

  • HI All,

      I need to locate (path ) some file at runtime.

      but it fails when it works with different system  say i have folder name in multicharater.
             example c:\\ chinese_character \example.txt 

      path=AfxGetApp()->m_pszHelpFilePath;  

          this above method fails...so is there any alternate method to give path or store file to use in runtime.


      

     
    Thursday, July 23, 2009 11:39 AM

Answers

  • vijaymukilan wrote:
    > I need to locate (path ) some file at runtime.
    >
    > but it fails when it works with different system say i have folder
    > name in multicharater.
    > example c:\\ chinese_character \example.txt

    Build your application with Unicode support (Project | Properties |
    General | Character Set = Use Unicode Character Set).
    --
    Igor Tandetnik


    • Marked as answer by Nancy Shao Thursday, July 30, 2009 8:36 AM
    Thursday, July 23, 2009 11:44 AM
  • If you want to find a file at runtime you can use the MFC CFileDialog class.  It will display a standard dialog to let the user select a file.
    • Marked as answer by Nancy Shao Thursday, July 30, 2009 8:36 AM
    • Unmarked as answer by vijaymukilan Thursday, August 06, 2009 1:23 AM
    • Marked as answer by vijaymukilan Thursday, August 06, 2009 1:23 AM
    Thursday, July 23, 2009 2:59 PM

All replies

  • vijaymukilan wrote:
    > I need to locate (path ) some file at runtime.
    >
    > but it fails when it works with different system say i have folder
    > name in multicharater.
    > example c:\\ chinese_character \example.txt

    Build your application with Unicode support (Project | Properties |
    General | Character Set = Use Unicode Character Set).
    --
    Igor Tandetnik


    • Marked as answer by Nancy Shao Thursday, July 30, 2009 8:36 AM
    Thursday, July 23, 2009 11:44 AM
  • If you want to find a file at runtime you can use the MFC CFileDialog class.  It will display a standard dialog to let the user select a file.
    • Marked as answer by Nancy Shao Thursday, July 30, 2009 8:36 AM
    • Unmarked as answer by vijaymukilan Thursday, August 06, 2009 1:23 AM
    • Marked as answer by vijaymukilan Thursday, August 06, 2009 1:23 AM
    Thursday, July 23, 2009 2:59 PM
  • Thanks !!

    I found the path is all system using the below line

    _wgetcwd(dir,250);

    // find the working directory path

    Meanwhile the project is build without unicode support and its too late to modify it to that..

    Thursday, August 06, 2009 1:25 AM