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. Manually adding resources to rc2 file

Manually adding resources to rc2 file

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioquestionlearning
3 Posts 3 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.
  • P Offline
    P Offline
    paulb
    wrote on last edited by
    #1

    I need to add a string resource manaully to the .rc2 file in an MFC project, so did this (copying from the syntax in .rc file): STRINGTABLE BEGIN IDS_THESTRING "really long string here.." END and with a define inside resource.h: #define IDS_THESTRING 101 This compiles but the strings defined in the normal .rc file (that are edited through the string table editor in VS) are no longer valid, any attempt to reference them fails. Is this the correct syntax for manually adding a string resource?

    J V 2 Replies Last reply
    0
    • P paulb

      I need to add a string resource manaully to the .rc2 file in an MFC project, so did this (copying from the syntax in .rc file): STRINGTABLE BEGIN IDS_THESTRING "really long string here.." END and with a define inside resource.h: #define IDS_THESTRING 101 This compiles but the strings defined in the normal .rc file (that are edited through the string table editor in VS) are no longer valid, any attempt to reference them fails. Is this the correct syntax for manually adding a string resource?

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      This is the correct syntax. You just have to make sure two strings don't have the same ID. John

      1 Reply Last reply
      0
      • P paulb

        I need to add a string resource manaully to the .rc2 file in an MFC project, so did this (copying from the syntax in .rc file): STRINGTABLE BEGIN IDS_THESTRING "really long string here.." END and with a define inside resource.h: #define IDS_THESTRING 101 This compiles but the strings defined in the normal .rc file (that are edited through the string table editor in VS) are no longer valid, any attempt to reference them fails. Is this the correct syntax for manually adding a string resource?

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        I think in your resource.h there is a counter of different controls. You have to set it up by one. (This very maybe could be your problem.) the counters are round about the last lines of the file. good luck. "If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix

        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