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

  • SEARCH
  • Home
  • 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 4087904
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:54:51+00:00 2026-05-20T18:54:51+00:00

I posted this question previously and now have the localized strings loaded (the ones

  • 0

I posted this question previously and now have the localized strings loaded (the ones we get with LoadString()) but I also need to load all the other resources from the satellite DLL.

MFC has the AfxSetResourceHandle () call, but I need something equivalent for a non-mfc app? I suspect I have to set that in the initialization code somewhere so all my resources are loaded from another DLL. How do I do that in a WTL (windows template library) context?

EDIT:

This summarizes our problem.

We are not using straight win32, but ATL and WTL for windows stuff. So we can’t rely on the MFC stuff and we don’t have low level control of the loading of menus and dialog resources.

EDIT:
Hmmm…
This seems to have an answer, but I was hoping for something better than that. For example – a SetResourceInstance() method analog to GetResourceInstance() in a CAppModule object.

  • 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-20T18:54:51+00:00Added an answer on May 20, 2026 at 6:54 pm

    The resource functions (FindResource, LoadResource) take a handle to a module as one of the parameters.

    Use GetModuleHandleEx to get the module handle for the DLL.

    Edit: Additional info for ATL/WTL.

    WTL uses ATL::_AtlBaseModule.GetResourceInstance() for the module handle in its Win32 calls. There’s a SetResourceInstance function that you can call to change the module that’s used. Something like this should work at the beginning of your program:

    HMODULE hmod;
    ::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_PIN, myDllFuncPtr, &hmod);
    ATL::_AtlBaseModule.SetResourceInstance(hmod);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have posted a question on here previously asking similar advise, but this project
I have a question about this question . I posted a reply there but
I've seen this question posted here previously but I'm not satisfied that I understand
I posted this basic question before, but didn't get an answer I could work
I posted this question here before but there were no responses. I may have
I previously posted this question as jquery/javascript: arrays - jquery/javascript: arrays . But since
Haven't seen many Geneva related questions yet, I have posted this question in the
I've posted this here , but thought it might deserve a question on its
I previously posted this question ( Reading Google docs spreadsheet ) and got a
sorry for my English. I previously posted this question as: Multiple ViewModels request same

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.