Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ARG! m_pszProfileName

ARG! m_pszProfileName

Scheduled Pinned Locked Moved C / C++ / MFC
c++windows-adminquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Scott H Settlemier
    wrote on last edited by
    #1

    m_pszProfileName is set by MFC's APPINIT.CPP to the filename by which the application was invoked. If the application was started via a short path name (using GetShortPathName), such as must be fairly common when passing the filename on command lines, the application will use the incorrect registry key. I use SetRegistryKey in my app's OnInitInstance and nothing else. So now I've got buggy programs. Should I have done something else? oh.. wait. I just looked. Right, I'm missing AFX_IDS_APP_TITLE in the string table which MFC uses to reset m_pszAppName to the correct application name--- which in turn causes pszProfileName to get later get set correctly. ARG, I those hidden chains of effects drive me crazy. Oh well. I guess I'll still hit submit on this.... :wtf:

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups