10-17-2018 06:04 AM
Hello,
10-17-2018 09:06 AM - edited 10-17-2018 09:07 AM
Why you see two instances of your panel is quite simple: you load the same panel (HL_PANEL) two times and display each instance. The first time in line 27 you load and localize the panel to your language, next you load it again in line 40 in native language.
After a bunch of customization, you display the panel in native language in line 188, next you display the localized instance in line 231. Get rid of the one you don't want and that's all.
10-17-2018 11:35 PM
10-18-2018 02:52 AM - edited 10-18-2018 02:54 AM
Now you must decide what to do in your application. You are loading the localized panel with 'panel' handle and the native, non-localized version with 'SHlPanel' variable. All customization is performed on the latter but the routine with the timer is called on the first one (lines 233÷242). I suppose there is some code there you have not posted.
So you must decide whether you want the application to be localized or not and route all code to that direction: simply avoiding to load one instance of the panel without other code modifications will drive to compile and/or run-time errors.
As an alternative, you can have some configuration parameter that defines in which locale to run the application and develop your code on this framework:
// GetAppLanguage () may return a 'localized' flag that defines whether to run native or localized UI GetAppLanguage (...); if (localized) { GetLocalLanguageFilePath (...); LoadLocalizedPanel (..., &panel); } else panel = LoadPanel (...); // Perform all customization on 'panel' // Do other stuff if needed // Display the user interface DisplayPanel (panel);
10-18-2018 03:35 AM
Thank you for answer.
I admit I will not program it for a long time, but I was given the task of modifying it to work.
This is where SHlPanel must stay, because almost the whole program is back on this declaration.
Also, as I released the program in the required language, the main window was in that particular language, but how much did I open the file from the file so I put it in the classical language.
So I do not know how to continue.
10-18-2018 06:11 AM
I'm not sure I understand exactly what you are saying, but if you don't need the panel in native language you should update the code related to 'panel' setting 'SHlPanel' instead and get rid of unwanted LoadPanel and DisplayPanel
10-21-2018 11:20 PM
Yes you are right.