CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Resource IDS

  1. #1
    Join Date
    Feb 2001
    Posts
    2,455

    Resource IDS

    I want to add buttons etc.... to a form but it tells me that the resource ID has already been used. Although this is true that it has been used, it was used on a different form, so why the problem? I have a IDC_ADD button one one form and IDC_ADD on a different form with no complaints, so why with certain ID's?

    Any ideas?

    Mike B

  2. #2
    Join Date
    Nov 2001
    Location
    Beyond Juslibol
    Posts
    1,688
    Resource Id's are defined only once. Give a look at you resource.h file.

    However two resource ID's can have the same value.

    For example:

    #define IDC_ADD 135
    #define IDC_ADD2 136
    ...
    ...
    #define IDC_QUIT 135.

    This case you can not mix IDC_ADD and IDC_QUIT in the same form because they have the same value. (135)

    The duplicates are normaly caused when copying resources.

    Perhaps you want to set IDC_ADD to a button int your form but you already have a control with the same value (but other Id).

  3. #3
    Join Date
    Jan 2002
    Location
    TamilNadu, India
    Posts
    158
    Other option is you can even open the script1.rc file in text mode(notepad) and edit the resources there itself.
    Muthu

  4. #4
    Join Date
    Jul 2003
    Posts
    116
    see in msdnTN035

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