Re: Localization - Dialog resource fails to load
- From: Lady_A <LadyA@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jan 2006 14:46:02 -0800
Tom, Vipin,
Thank you!
I have found the problem.
I've mispelled the preprocessor definition AFX_TARG_DEU for the german build
resources configuration.
However, now I have other problems.
For all the languages, but german, everything works good.
For german, DoModal throws an access violation.
Debugging MFC shows that this line throws the exception :
hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate,
pParentWnd->GetSafeHwnd(), AfxDlgProc);
hInst, lpDialogTemplate, AfxDlgProc are all fine and valid adresses.
m_hWnd of the pParentWnd is not :
m_hWnd CXX0030: Error: expression cannot be evaluated
Any ideas ?
What to look for ?
The other problem is for all the languages :
One of the ctrls of the dialog is an ATL Composite Ctrl which comes from
another project. It is supposed to show text.
What happens is that my dialog shows the language extension right before
that text:
<fr>TEXT
Where does that come from ? How do I get rid of that ?
--
Thank you!!!
"Vipin" wrote:
> I asked Lady to open up the binary dll as type resource file in the IDE
> and verify. Lady's response was that the relevant resources could be seen in
> the binary
> which was built.
>
> --
> Vipin Aravind
> Microsoft - MVP
>
> "Tom Serface" <tserface@xxxxxxx> wrote in message
> news:%23VxVmKeHGHA.2680@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi Lady_A,
> >
> > Could it be that you have a macro defined wrong in the projects for your
> > resource DLL's that is keeping the actual resources from being including
> > in the build. I've had this happen before. The DLL seems to build OK
> > and, of course, the resource.h file contains the right IDs so the main
> > project builds, but the resource is not in the .DLL because the .RC file
> > has it #ifdef'd out. Look for this in the text version of the .RC file
> > and see. Could be you don't have your languages set up right in the
> > Version part of the resources (I've done that before too).
> >
> > Hope this helps,
> >
> > Tom
> >
> > "Lady_A" <LadyA@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:0B3BE375-18D4-488A-B021-9B4886DEB146@xxxxxxxxxxxxxxxx
> >> Hi,
> >>
> >> I have a few dialogs, icons, bitmaps, strings that I've localized in the
> >> following way:
> >> I've created a separate resource only dll which has a separate RC file
> >> for
> >> each language.
> >> This project also has a different build configuration for each language.
> >> So that in that configuration only that dll will build and the resources
> >> pane in the project properties will be set to the proper culture for each
> >> build configuration.
> >>
> >> I am loading that dll from a COM c++ dll in the following way:
> >> m_hDll = ::LoadLibraryEx(filename.c_str(),NULL,LOAD_LIBRARY_AS_DATAFILE);
> >> ATLASSERT(m_hDll != NULL);
> >> ATL::_AtlBaseModule.SetResourceInstance(m_hDll);
> >> AfxSetResourceHandle(m_hDll);
> >>
> >> It loads successfully and loads the correct file.
> >> However it fails to show the modal dialog (DoModal) - failure to load the
> >> dialog template resource.
> >>
> >> This only happens if my culture is not english.
> >> Once it's english everything is great.
> >> Another weird issue is that compiling the resources dll in a different
> >> culture produces a tiny dll, 3 KB instead of 808 KB!
> >> However, one languge does work (did load the dialog before I created some
> >> more build configurations) and it's 88 KB...
> >> I did compare the project settings of different culture building
> >> configurations.
> >> And it looks all right.
> >> Tried restart, rebuild... Another language...
> >> The settings that r different in each build configuration I have for the
> >> resource dll r the culture info in the resources pane and the name of the
> >> output dll. Thats it.
> >>
> >> How can I find out whats wrong ?
> >> Any debugging tips ?
> >> Any solutions ?
> >>
> >> --
> >> Thank you!!!
> >
> >
>
>
>
.
- Follow-Ups:
- Re: Localization - Dialog resource fails to load
- From: Tom Serface
- Re: Localization - Dialog resource fails to load
- References:
- Re: Localization - Dialog resource fails to load
- From: Tom Serface
- Re: Localization - Dialog resource fails to load
- From: Vipin
- Re: Localization - Dialog resource fails to load
- Prev by Date: Re: problem with IXMLDOMDocument's method loadXML
- Next by Date: Looking for some advice -- replacing IE with custom app
- Previous by thread: Re: Localization - Dialog resource fails to load
- Next by thread: Re: Localization - Dialog resource fails to load
- Index(es):
Relevant Pages
|