Results 1 to 4 of 4

Thread: getting the applications parth.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    243

    getting the applications parth.

    hi. I need to store an application parth and display it. I am using a MFC application and NEED HELP.

    please tell me how to display the application parth (app.parth in vb) in a MessageBox

    thanks for your help.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You could have found the answer with the search function. It was asked about a week ago.

    Anyway, use
    GetModuleFileName(NULL, stzBuffer, iBufferLength);

    Alternativly you can use the m_pszExeName member of your application class, but you have to append the file extension yourself.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    243
    ok i'm kind of a newbie at this so can you tell me to display it in a MessageBox

    (include the code please)

    Thanks

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    What kind of newbie? Do you know C++ well enough to use character buffers?

    If yes then I don't need to help you. If no then I don't want to help you. Sorry, I'm cutting down on helping newbies using the WinAPI.

    And as I said, there's the search function.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width