×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Create id labels working with various .rc files?
2

Create id labels working with various .rc files?

Create id labels working with various .rc files?

(OP)
I´m working with various *.rc files in the same project. When you create anIDC_ or IDD_ or IDI_ or IDB_ number for resources and dialogs, Visual repeat frequently the same number. Is possible to change the number of the new resource at the end of resource.h file, but it´s very laborious if u work with a lot of controls and dialogs. Is an esay way for take the control of these numbers. What kind of problems colud i have if some resources have the same numbers? Thanks.

RE: Create id labels working with various .rc files?

I would allocate a block of IDs for each resource file. Then, update all IDS in the header to fit into that region for each set of resources. Make sure to update the values at the bottom of the resource file (the NEXT values) so that the next automatically generated value for that resource comes after in the region you want it to.

Does that make sense? We've done something like this and once it is setup it works pretty well. I'm not sure if there is a better or more automatic way to handle it.

RE: Create id labels working with various .rc files?

I've usually resorted to renumbering the resource.h file by hand, but Uolj's blocks make sense.  You'd only have to modify the NEXT value once, immediately after creating the resource script.

Basically, resource1.rc would use values 1000-1099, resource2.rc would use 1100-1199, etc.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close