Re: Localization - Dialog resource fails to load



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!!!
> >
> >
>
>
>
.



Relevant Pages

  • Re: error RC2135 : file not found: filename.tlb
    ... using macros (the error is generated when compiling a ... copying it from the working configuration. ... Under the Resources tree, ... And we're specifying the intermediate directory ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Strange device init
    ... >>The device doesn't get its resources configured properly. ... On other laptops the configuration is done via ... Finally have you checked if PnPBIOS detects the device? ... _PRS and _CRS at least returns the proper resources that should be used. ...
    (Linux-Kernel)
  • Re: Abolute path of argv[0]
    ... There is no good reason to do ... | It -seems- like all configuration files live in etc for a system so ... do correct me if I'm wrong as I'm a Linux Noob ... resources outside the actual executable file itself. ...
    (comp.os.linux.development.apps)
  • Re: code 10
    ... with Crystal WDM, so that puts me at a dead end. ... Click "Set configuration manually". ... sure there are no conflicts reported in the "Conflicting device list". ... When I do that I get error 'You cannot modify the resources in this config. ...
    (microsoft.public.windowsxp.music)
  • How to set the ResourceManager default file path ?
    ... In my application I have a DLL which contains only resources ... This DLL is translated to several languages which are ... located in different folders. ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast