There is a DLL written in delphi. DLL consists of:

  1. Main forms to which TMainMenu and TImageList are attached.
  2. InteractEx ​​functions through which the form is created.

    var MainForm: TMainForm; begin // Π‘ΠΎΠ·Π΄Π°Π΄ΠΈΠΌ Π³Π»Π°Π²Π½ΠΎΠ΅ ΠΎΠΊΠ½ΠΎ прилоТСния. Application.CreateHandle; // Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅ΠΌ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Application.CreateForm(TMainForm, MainForm); Application.Initialize; try // НачинаСм Ρ€Π°Π±ΠΎΡ‚Ρƒ Π² ΠΈΠ½Ρ‚Π΅Ρ€Π°ΠΊΡ‚ΠΈΠ²Π½ΠΎΠΌ Ρ€Π΅ΠΆΠΈΠΌΠ΅. Application.Run; Application.RemoveComponent( MainForm ); finally MainForm.Release; end; 

The situation is this - if TMainMenu.Images is assigned to TImageList, when loading the dll from the application, different behavior is obtained, depending on the language in which the application is written. More precisely, the appearance of TMenuItem is changing.


Application loading dll is written in Delphi:

enter image description here

The application loading dll is written in C ++:

enter image description here

The same DLL is loaded. Wednesday Embarcadero RAD studio xe5.

  • Did you remember to set all the parameters with handles? or did they leave them by default? - Vladimir Klykov
  • Vladimir Klykov, left everything as it was, did not change anything. Please tell me what you mean. - FreezeLook
  • Pens put the font (all parameters). - Vladimir Klykov

1 answer 1

Apparently in the C ++ application there is no manifest with the prescribed dependence on common controls (aka XP style):

 <?xml version="1.0" encoding="utf-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly> 
  • I'm afraid not, I added a manifest to the project (through the project settings, I just threw it into vcproj and through the resource file), bold fonts are still present. I even tried to add the XPManifest component to the form. Anyway thanks a lot for the answer. - FreezeLook