CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    15

    VISUAL C++ resource.h/rc madness mess

    This is really for those Visual C++ 6.0 programmers out there.

    I have a workspace which builds 3 apps & dozen of DLLs. Each project has it's own resources (resource.h & corresponding RC file).

    I like to merge the resources of the 3 main apps into one. I notice the 3 apps share some common strings. However, due to 10-20 years of development, the defined constants that have same name may not have same number.

    App1 resource.h
    #define IDS_STRING1 82

    App2 resource.h
    #define IDS_STRING1 79

    App3 resource.h
    #define IDS_STRING1 83


    Am wondering if there's a tool out there that can clean up multiple resources... to make final/eventual merging easier.

    Problems lie when it's a common define constant, but the string literal are actually different.

    So maybe should have a batch routine to index/map by the string literal first, then ensure the define constant matches, if not then flag it.

    My resource.h files are huge, millions of lines... hence why am wondering if there exists a resource.h cleaner.

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: VISUAL C++ resource.h/rc madness mess

    AFAIK there isn't such a tool, but then I don't know all the tools in the world.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: VISUAL C++ resource.h/rc madness mess

    Quote Originally Posted by andwan0 View Post
    Am wondering if there's a tool out there that can clean up multiple resources... to make final/eventual merging easier.
    There is a wonderful tool named "not lazy programmer".
    Quote Originally Posted by andwan0 View Post
    My resource.h files are huge, millions of lines...
    Come on, let's be serious! You mean "tens" or maybe "hundreds of lines".
    Last edited by ovidiucucu; February 20th, 2011 at 01:00 PM.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

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

Featured