Shortcut Help, C++, wxWidgets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohaakilla51
    New Member
    • Jul 2007
    • 39

    Shortcut Help, C++, wxWidgets

    OK, so I am making a program, with C++ and wxWidgets in which it reads stuff from a text file. My problem is, I made an installer, and it puts a shortcut on the desktop, but, whenever you run the shortcut, it tries to find the text files on the desktop and not the installation directory, where the shortcut links to. This is obviously because I didn't use absolute directories, but rather relative ones, so, is there anyway I can make it read the relative directories from the directory in which the program actually resides, rather than where the shortcut resides?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Windows?? Use GetModuleFileNa me().

    http://msdn2.microsoft.com/en-us/library/ms683197.aspx.

    Comment

    Working...