Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1021173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:16:16+00:00 2026-05-16T11:16:16+00:00

We have a very big MFC application that have 16 projects in the solution.

  • 0

We have a very big MFC application that have 16 projects in the solution. Each project is a DLL. Four(4) of these projects are what we call “Network”. In each network, there is a dialog that we will call X. This dialog is VERY different in each of the network but the name of the dialog itself is the same in each of the resource.h. In resource.h, they also have the same ID (value).

What happend right now is that when I’m on the network 1 and load the class with the dialog X, it try to use the dialog from Network 2. Since they don’t have all the same control in it, it crash in the DoDataExchange trying to find controls that don’t exist in the other network.

Does anybody know what can cause this? Attemps at changing the name in the network that do not work didn’t change anything since it use the ID…

I always think that the DLL was using it’s own resource.h but now it’s seems that it’s not the case…

Can anybody help?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:16:17+00:00Added an answer on May 16, 2026 at 11:16 am

    It sounds like you need to call AfxSetResourceHandle to specify the DLL from which to load the dialog.

    Edit: Given your description, you’ll basically need to call this with the right value every time you display a dialog. Changing things like the DLL load order isn’t going to fix the problem — at any given time, MFC is going to try to use one order for the DLLs/EXE to load all dialogs, and this is modal, so it stays the same until you change it. Given the same resource ID needing to refer to different resources at different times, you need to tell it which one at any given time — otherwise, you get the first thing it finds with the right ID, and almost no control over which that will be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.