Page 1 of 1

icon("") doesnt seem to work for CHM files

Posted: Mon Mar 09, 2026 9:50 am
by lugosisghost
Good Morning all
If I used the ICON("<path>") command and use a CHM file for the link, should it show the regular icon for a CHM file? If so, it is not working for me. The icon seems to be blank.

Re: icon(".chm\.ico") ?

Posted: Mon Mar 09, 2026 12:16 pm
by Лестер Глючный
Do you mean, an associated icon with a .chm [HKCR\chm.file\DefaultIcon]? I don't think if it is good|safe to "extract into memory" a PE-file (.exe, .dll/…) or .ico placed inside a .chm archive…

Re: icon("") doesnt seem to work for CHM files

Posted: Mon Mar 09, 2026 2:53 pm
by ewild
lugosisghost
CHM file icon is not stored in a .chm file itself.
Typically, the source of the icon is the hh.exe.
You can see it in the Windows registry:

Code: Select all

[HKEY_CLASSES_ROOT\chm.file\DefaultIcon]
Name=(Default)
Type=REG_EXPAND_SZ
Data=%SystemRoot%\hh.exe,0
Thus, if you need to see the standard CHM file icon for an AkelPad button/menu entry, and don't have this icon saved separately as the .ico file, or within an .icl/.dll icon library, use ICON("<path>") as follows:

Code: Select all

<your command/button/menu entry> Icon("%SystemRoot%\hh.exe,0")
or just (since the default icon index is 0):

Code: Select all

<your command/button/menu entry> Icon("%SystemRoot%\hh.exe")

Re: icon("") doesnt seem to work for CHM files

Posted: Mon Mar 09, 2026 11:40 pm
by lugosisghost
Thank you, EWILD, for that answer! Now that I think about it, I feel incredibly foolish having asked that question.......I knew that answer, I just forgot that I knew that answer :O