Re: Alternative to 'AfxSetResourceHandle'
Hi Martin,
This sample project might help you. I use LoadLibrary() and
AfxSetResourceHandle() to load resources based on a file name for the DLL I
derive from the LCID returned from GetThreadLocale(). The resources I load
basically "replace" those that are built in since I change the resource
handle used by the application. One problem I've found is that MFC uses
FindResource() rather than FindResourceEx() so you can't have more than one
language in a resource DLL or EXE. I'm not sure why they did it this way
(perhaps legacy code).
http://msdn2.microsoft.com/en-us/library/xa89kyh5(VS.80).aspx
Tom
"Martin" <martin-g@mail.ru> wrote in message
news:1174720992.353986.277920@p15g2000hsd.googlegroups.com...
On Mar 23, 7:32 pm, "Alexander Grigoriev" <a...@earthlink.net> wrote:
If I remember correctly, MFC builds a chain of resource DLLs and its
FindResource function will scan them all. Thus it may not be necessary to
duplicate all the resources, you may be able to put default resources
into
your EXE. Although that depends on the order in the chain.
"Martin" <marti...@mail.ru> wrote in message
news:1174631935.186190.174270@n76g2000hsh.googlegroups.com...
I also heard of that, but yet can't find much information about it.
Now MFC doesn't seem to work in that way. When I change the locale, my
application simply doesn't load icons, images etc., as they are not
found in the specified resource DLL. Would you please give some links
about it, if you have?