1
votes

I have an mfc resource only dll's with strings and menus, but i want to have icons and bitmaps only in the main application (MFC exe), i don't want to have the same bitmap/icons in the n resource only dll's, only in the main application.

Is this possible? and if is, how we can accomplish this? (i try to use the neutral language in the icons and bitmaps but when i make the loadimage/loadicon it fails.

Note: i use the AfxSetResourceHandle(dll) to set my resources

Thanks

2

2 Answers

1
votes

You could just keep calling AfxSetResourceHandle each time you need to load a resource, giving it the handle of the DLL you expect to find the resource in. Alternatively you could bypass MFC for one set of resources or the other using e.g. ::LoadImage which takes an instance handle as a parameter.

1
votes

MFC has a pretty elaborate system for searching the resources of a wide range of extra DLLs beyond the resource DLL you declare (see AfxFindResourceHandle in dllinit.cpp). I suggest putting your language-neutral resources in a separate DLL and treating it like an extension DLL.

Martyn