locked
Visual Studio MFC dialog application. There are duplicate IDs in resource.h RRS feed

  • Question

  • I created a dialog application in Visual Studio MFC.
    I copy some button and edittext from A.rc to B.rc in resource view.

    B.rc ->  There are duplicate IDs in resource.h

    Any good way to sort out IDs in B.rc?
    Monday, August 17, 2020 7:30 AM

All replies

  • Hi,

    Thank you for posting here.

    >>Visual Studio MFC dialog application. There are duplicate IDs in resource.h

    If these controls on different dialog boxes, there's no issue with them having the same ID - they only need to be unique for controls on the same dialog.

    You could try to change the symbol value: In Resource View, right click your project node (usually shown as ProjectName.rc) and choose Resource Symbols. And then you could change the unassigned symbol.

    I suggest you could refer to the link: https://docs.microsoft.com/en-us/cpp/windows/changing-a-symbol-or-symbol-name-id?view=vs-2019

    Best Regards,

    Jeanine Zhang


    "Visual c++" forum will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A !
    For more information, please refer to the sticky post.

    Monday, August 17, 2020 9:13 AM