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. How do I access the 'ProductVersion" from VS_VERSION_INFO

How do I access the 'ProductVersion" from VS_VERSION_INFO

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiotutorialquestionannouncementlearning
4 Posts 4 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.
  • C Offline
    C Offline
    cgb143
    wrote on last edited by
    #1

    Can someone tell me how to access the 'ProductVersion" from VS_VERSION_INFO in the resource file. I want to set the version number when I compile and use in a MessageBox from within my program Thanks

    T C T 3 Replies Last reply
    0
    • C cgb143

      Can someone tell me how to access the 'ProductVersion" from VS_VERSION_INFO in the resource file. I want to set the version number when I compile and use in a MessageBox from within my program Thanks

      T Offline
      T Offline
      try88
      wrote on last edited by
      #2

      BOOL CString::LoadString( UINT nID ); throw( CMemoryException ); Return Value Nonzero if resource load was successful; otherwise 0. Parameters nID A Windows string resource ID. Reads a Windows string resource, identified by nID, into an existing CString object. The following example demonstrates the use of CString::LoadString. // example for CString::LoadString #define IDS_FILENOTFOUND 1 CString s; if (! s.LoadString( IDS_FILENOTFOUND )) { AfxMessageBox("Error Loading String: IDS_FILENOTFOUND"); ... } 路漫漫其修远兮,吾将上下而求索。

      1 Reply Last reply
      0
      • C cgb143

        Can someone tell me how to access the 'ProductVersion" from VS_VERSION_INFO in the resource file. I want to set the version number when I compile and use in a MessageBox from within my program Thanks

        C Offline
        C Offline
        cmk
        wrote on last edited by
        #3

        There are a number of articles here on CP. Just do a search on 'version'. ...cmk Save the whales - collect the whole set

        1 Reply Last reply
        0
        • C cgb143

          Can someone tell me how to access the 'ProductVersion" from VS_VERSION_INFO in the resource file. I want to set the version number when I compile and use in a MessageBox from within my program Thanks

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          cgb143 wrote: Can someone tell me how to access the 'ProductVersion" from VS_VERSION_INFO in the resource file. Use [GetVersionInfo] api or try out this wrapper class:- www.codeproject.com/file/VersionInfo.asp[^]

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          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