Contents of CHM looks weird when using Delphi 10.3 skins
Moderators: Alexander Halser, Michael Schwarzl
- Olivier Beltrami
- Posts: 393
- Joined: Mon Jul 15, 2002 3:30 pm
- Location: Nantes, France
- Contact:
Contents of CHM looks weird when using Delphi 10.3 skins
I wonder if anyone experienced the issue I am encountering.
I have added the windows 10 Slate skin to my Delphi 10.3 app bu now when I call the CHM help, the contents tree is all black, until I click on each element, one by one (see attached image). Has anyone encountered this issue ?
Very best regards,
Olivier
You do not have the required permissions to view the files attached to this post.
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
- Alexander Halser
- EC-Software Support
- Posts: 4101
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Contents of CHM looks weird when using Delphi 10.3 skins
Hi Olivier,
I am not sure about the 10.3 skins in Delphi and how they work. I haven't seen this problem with Developer Express skins, for instance. But I know of other 3rd party skins that influence the UI of the help window, if invoked. It most probably has to do with the way the help file gets invoked.
The standard way in Delphi is to include the unit HtmlHelpViewer into the uses clause and use the TApplication help calls to display help. Example:
This results in the HtmlHelp() call that uses the application handle as the first parameter and subsequently makes the help window a child of the application. Here's probably the source of the problem: depending on how the skin works in the background, it probably tries to skin the help window as well, though it is not a Delphi form.
Try to make a direct call to HtmlHelp() from your application and see if this makes a difference:
I am not sure about the 10.3 skins in Delphi and how they work. I haven't seen this problem with Developer Express skins, for instance. But I know of other 3rd party skins that influence the UI of the help window, if invoked. It most probably has to do with the way the help file gets invoked.
The standard way in Delphi is to include the unit HtmlHelpViewer into the uses clause and use the TApplication help calls to display help. Example:
Code: Select all
Application.Helpfile := 'c:\mypath\myhelpfile.chm';
Application.HelpShowTableOfContents;
Try to make a direct call to HtmlHelp() from your application and see if this makes a difference:
Code: Select all
var
tmphelpcall: String;
begin
application.Helpfile := 'c:\mypath\myhelpfile.chm';
if MyTopicID <> '' then
tmphelpcall := Format('%s::/%s', [Application.HelpFile, changeFileExt(MyTopicID, '.htm')])
else
tmphelpcall := Application.HelpFile;
HtmlHelp(0, pchar(tmphelpcall), HH_DISPLAY_TOPIC, 0); // <= this is the direct call of the HTML Help API
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
- Olivier Beltrami
- Posts: 393
- Joined: Mon Jul 15, 2002 3:30 pm
- Location: Nantes, France
- Contact:
Re: Contents of CHM looks weird when using Delphi 10.3 skins
Thank you very much, Alexander.
I will try your suggestion and let ou know how it turns out.
I will try your suggestion and let ou know how it turns out.
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
- Olivier Beltrami
- Posts: 393
- Joined: Mon Jul 15, 2002 3:30 pm
- Location: Nantes, France
- Contact:
Re: Contents of CHM looks weird when using Delphi 10.3 skins
Hello again,
It turns out that, almost everywhere in my app, I had been making direct calls to HtmlHelp() for over 10 years, probably due to some other issue I had encountered. But this case was help called from a special button component that I designed in 2002, and which still used Application.HelpContext(). Changed the code of that component to also use HtmlHelp() and the problem is gone
Thank you very much !
Olivier
It turns out that, almost everywhere in my app, I had been making direct calls to HtmlHelp() for over 10 years, probably due to some other issue I had encountered. But this case was help called from a special button component that I designed in 2002, and which still used Application.HelpContext(). Changed the code of that component to also use HtmlHelp() and the problem is gone
Thank you very much !
Olivier
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data