DelphinSoftware / vcl-styles-utils

Automatically exported from code.google.com/p/vcl-styles-utils
0 stars 0 forks source link

Windows help of styled app does not show Index items correctly #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run a help (F1) in application (via IHelpSystem interface)
2. Select Index tab in help
3. Move mouse

What is the expected output? What do you see instead?
- Index items shown normally
- After initial showing and after mouse move items disappear. Clicking 
in Index space makes a single item visible (see image attached).

What version of the product are you using? On what operating system?
Delphi XE4, Windows 7

Please provide any additional information below.
Affected index window class is 'hh_kwd_vlist'

Original issue reported on code.google.com by everyb...@gmail.com on 3 Feb 2015 at 1:19

Attachments:

GoogleCodeExporter commented 9 years ago
The tab contents are lost (not drawn) as ttPane element is drawn in 
TSysTabControlStyleHook.Paint

Original comment by everyb...@gmail.com on 4 Feb 2015 at 2:25

GoogleCodeExporter commented 9 years ago
Hi, can you please attach a minimal sample App to reproduce the issue?

Original comment by Rodrigo.Ruz.V@gmail.com on 4 Feb 2015 at 2:55

GoogleCodeExporter commented 9 years ago
Sample project attached

Original comment by everyb...@gmail.com on 5 Feb 2015 at 9:39

Attachments:

GoogleCodeExporter commented 9 years ago
The IHelpSystem interface works loading the hhctrl.ocx module into the current 
Application, this causes which this file (hhctrl.ocx) uses the same hooked dlls 
(UxTheme.dll, user32.dll and so on).  because that you can see only some 
element styled. Unfortunately the hooks used to replace the WndProc and paint 
the another CommCtrls (like ToolbarWindow32, SysTabControl32) doesn't works on 
OCX modules.  

As workaround you can use the hh.exe to open the chm files like so 

 ShellExecute(Handle, 'open', 'hh.exe', PWideChar(ExtractFilePath(Application.ExeName)+'Help.chm::/welcome.htm>Main'), nil, SW_SHOW);

Original comment by Rodrigo.Ruz.V@gmail.com on 9 Feb 2015 at 4:24

GoogleCodeExporter commented 9 years ago
A practical fix is to comment out the following line:

procedure TSysTabControlStyleHook.Paint(Canvas: TCanvas);
begin
...
//StyleServices.DrawElement(Canvas.Handle, Details, R);
...
end;

Original comment by everyb...@gmail.com on 10 Feb 2015 at 11:30