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

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 2
Joined: Sun Jun 23, 2024 2:23 pm

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

Post 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.

Offline
Posts: 20
Joined: Wed Jan 22, 2025 5:23 am

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

Post 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…

Online
Posts: 61
Joined: Sat Jul 05, 2008 11:30 am
Location: Odesa, Ukraine

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

Post 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")

Offline
Posts: 2
Joined: Sun Jun 23, 2024 2:23 pm

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

Post 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
Post Reply