Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.


This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 7 - Last Post: Apr 22, 2017 6:07 AM Last Post By: Andreas Oeding
Robin Anderson

Posts: 10
Registered: 10/6/99
Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 25, 2016 9:24 AM
This seemed to be the most logical forum to post an anomaly using the "Vcl.HTMLHelpViewer" unit to link to a Windows HTML help (CHM) context sensitive help file.

Styles from my Seattle-10 app display in the HTML help file when the F1 key is pressed. I thought this was pretty cool, but the index gets masked and is unreadable and the toolbar buttons get clipped. If I launch the help as a stand alone app, all is OK. I've been told on the Help and Manual forum there are more current formats available replacing the old CHM setup and will explore the recommendations.

Is there something that can be done to "disable" the styles on invoking the help? I have a screen shot of the situation if uploading small files is allowed.

Cheers,
R
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 25, 2016 11:24 AM   in response to: Robin Anderson in response to: Robin Anderson
Robin,

| I have a screen shot of the situation if uploading
| small files is allowed.

You can upload it into the attachments group.

--

Q -- XanaNews 1.19.1.372 - 2016-07-25 11:23:22
Robin Anderson

Posts: 10
Registered: 10/6/99
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 25, 2016 11:32 AM   in response to: Quentin Correll in response to: Quentin Correll
Thanks Quentin.

I'll repost the message there with the screen shot attachment.

Quentin Correll wrote:
Robin,

| I have a screen shot of the situation if uploading
| small files is allowed.

You can upload it into the attachments group.

--

Q -- XanaNews 1.19.1.372 - 2016-07-25 11:23:22
Ian Branch

Posts: 442
Registered: 9/23/99
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 25, 2016 2:11 PM   in response to: Robin Anderson in response to: Robin Anderson
Hi Robin,
Whew! I thought it was just me. I raised this issue some time ago with no resolution. It's not just files generated
by Help & Manual either.
Until there is a resoulution I am using VCLSkin http://www.link-rank.com/ to replicate the style I want as close as
possible.
Rather the native Styles though.

Regards,

Ian
Robin Anderson

Posts: 10
Registered: 10/6/99
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 25, 2016 2:56 PM   in response to: Ian Branch in response to: Ian Branch
Hi Ian.

Thanks for the link ... I'll explore the site,

As I am rewriting the help for the app, I got a good suggestion to replace the Windows 98 CHM files with H&M EWriter eBooks format. This format isn't affected by Delphi's styles. It has an updated Windows 10 style format. There is still all the context sensitive connections available and you can separate the non executable help "file" from the reader. This will make downloading updated help file easier. There will be more hoop jumping in the app to track help context IDs, but I'm further ahead than I was when I discovered this on Friday afternoon!

Ian Branch wrote:
Hi Robin,
Whew! I thought it was just me. I raised this issue some time ago with no resolution. It's not just files generated
by Help & Manual either.
Until there is a resoulution I am using VCLSkin http://www.link-rank.com/ to replicate the style I want as close as
possible.
Rather the native Styles though.

Regards,

Ian
Andreas Oeding

Posts: 2
Registered: 10/20/01
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 21, 2017 5:46 AM   in response to: Robin Anderson in response to: Robin Anderson
Hi,
I ran into exactly the same problem with Delphi 10.1 Berlin and a chm file created by Help'nDoc.
Did anyone meanwhile figure out how to use the build-in help system (Vcl.HtmlHelpViewer) without porting the app's style to the Windows help window?
Thanks,
A.
Ian Branch

Posts: 442
Registered: 9/23/99
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 21, 2017 3:00 PM   in response to: Robin Anderson in response to: Robin Anderson
Possible solution to this issue..

Hi Team,
As previously indicated I too came across this issue.
After a lot of experimenting I found that by publishing in the Microsoft eWriter eBook format, I use H&M, I only had
to change one line and all good.

So, by adding shellapi to the uses, and changing this..

		procedure TfrmTest.mnuHelpTopicsClick(Sender: TObject);
		begin
		  	Application.HelpContext(0);   //Display Help.
		end;
	To this..
		procedure TfrmTest.mnuHelpTopicsClick(Sender: TObject);
		begin
			ShellExecute(0, 'open', 'Test_Help.exe',  '', nil, SW_SHOW);	//Display Help.
		end;
 
	Or, this..
		procedure TfrmTest.mnuProcedureClick(Sender: TObject);
		begin
			Application.HelpContext(500);
		end;
 
	To this..
		procedure TfrmTest.mnuProcedureClick(Sender: TObject);
		begin
			ShellExecute(0, 'open', 'Test_Help.exe', '500', nil, SW_SHOW);
		end;
		


HTH.

Regards,
Ian
Andreas Oeding

Posts: 2
Registered: 10/20/01
Re: Style from Delphi Seattle-10 drifting into Help & Manual HTML Help file.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 22, 2017 6:07 AM   in response to: Ian Branch in response to: Ian Branch
Hi Ian,
thanks for posting Your solution here. Although I intended to keep my existing chm file, Your way of calling the help system by ShellExecute gave me the final kick to solve this. Here is how I got it working.

I removed the Vcl.HtmlHelpViewer from the uses list. Instead I added a TApplicationEvents object to catch all help calls in one place:
function TForm1.ApplicationEventsHelp (Command: Word; Data: NativeInt;
                                          var CallHelp: Boolean): Boolean;
 begin
  CloseHelpWnd;
  Result := ShellExecute(0,'open','hh.exe',
                         PWideChar('-mapid '+IntToStr(Data)
                                   +' ms-its:'+Application.HelpFile),
                         nil,SW_SHOW) = 32;
  CallHelp := false;
 end;

Since every call of hh.exe opens a new chm help window, I close the existing window before creating an new one:
procedure TForm1.CloseHelpWnd;
 const HelpTitle = 'Sample';
 var HlpWind: HWND;
 begin
  HlpWind := FindWindow('HH Parent',HelpTitle);
  if HlpWind <> 0 then PostMessage(HlpWind,WM_Close,0,0);
 end;

Replace the HelpTitle 'Sample' with the actual title of Your chm help. Finally calling CloseHelpWnd in the FormDestroy event makes the help window disappear when Your application terminates.
There's no need to change any existing Application.HelpContext calls in the entire project and it handles the F1 key as well.
The help window created by hh.exe in ShellExecute doesn't care about the Delphi project Styles and shows everything fine.

I'm a bit unlucky with killing the old window and creating a new one, spend a lot of time in searching a way to make the existing window show another topic. There must be a way to do this, some message sent to the HlpWind would shurely do, but I didn't find anything to do this.
If anyone of you has an idea, don't hesitate to post it here!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02