DelphinSoftware / vcl-styles-utils

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

Compilied Html Help (CHM) Windows - unsupported #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Add to uses Vcl.Styles.Hooks & Vcl.Styles.Utils.SysControls.
2.Apply one of VCL Styles.
3.Call inside a program WinAPI "HtmlHelp" function that opens a chm file.

What is the expected output? What do you see instead?
Opened help window should be styled completely, or non-styled at all(depends on 
preferences), instead it's half-styled(partially styled).

What version of the product are you using? On what operating system?
Delphi XE7 Pro on Windows 7 64-Bit SP1 Pro 

Please provide any additional information below.
Dark 'Amakrits' theme is applied.

Original issue reported on code.google.com by mad.doub...@gmail.com on 3 Dec 2014 at 9:02

Attachments:

GoogleCodeExporter commented 9 years ago
The HtmlHelpW internally loads the hhctrl.ocx OCX using the LoadLibrary method, 
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 4 Dec 2014 at 2:39

GoogleCodeExporter commented 9 years ago
Thank you. I was guessing that's just HtmlHelp is doing something wrong.

However, I noticed that disabling Vcl.Styles.Hooks solves a problem, but this 
way TTaskDialog is showed non-styled as well. It's all about globally 
intercepted GetSysColor and GetSysColorBrush functions inside that unit. It 
also causes that disabling vcl styles for components isn't working. Just 
TStyleManager.Engine.RegisterStyleHook(TButton,TStyleHook) and play with 
Vcl.Styles.Hooks added and removed.

If only it was possible to tell Vcl Styles for what exactly window handles 
should be used default windows routines (old hook so-called). 

Original comment by mad.doub...@gmail.com on 4 Dec 2014 at 12:25