Hi,
I confirm that both CTRL+F and CTRL+C do not work under Delphi Alexandria + Win11 64b.
Not working is:
HtmlHelp(0, Application.HelpFile, HH_DISPLAY_TOC, 0);
HtmlHelp(0, Application.HelpFile, HH_DISPLAY_INDEX, DWORD(PWideChar('')));
HtmlHelp(0, Application.HelpFile, HH_DISPLAY_SEARCH, DWORD(@Query));
Application.HelpContext()
Calling HtmlHelpW instead of HtmlHelp works.
A broken Application.HelpContext solved them like this:
function TFormMain.ApplicationEvents1Help(Command: Word; Data: NativeInt;
var CallHelp: Boolean): Boolean;
begin
HtmlHelpW(0, PWideChar(Application.HelpFile), HH_HELP_CONTEXT, Data);
CallHelp := False;
end;
I used HH_HELP_CONTEXT because even when calling the Application.HelpContext the Command parameter contained 1 instead of 15.
Of course, this solution does not work if HelpKeyword is used for components.
A universal solution could be made by possibly recoding these constants.
const
{ Commands to pass to WinHelp() }
{$EXTERNALSYM HELP_CONTEXT}
HELP_CONTEXT = 1; { Display topic in ulTopic }
{$EXTERNALSYM HELP_QUIT}
HELP_QUIT = 2; { Terminate help }
{$EXTERNALSYM HELP_INDEX}
HELP_INDEX = 3; { Display index }
{$EXTERNALSYM HELP_CONTENTS}
HELP_CONTENTS = 3;
{$EXTERNALSYM HELP_HELPONHELP}
HELP_HELPONHELP = 4; { Display help on using help }
{$EXTERNALSYM HELP_SETINDEX}
HELP_SETINDEX = 5; { Set current Index for multi index help }
{$EXTERNALSYM HELP_SETCONTENTS}
HELP_SETCONTENTS = 5;
{$EXTERNALSYM HELP_CONTEXTPOPUP}
HELP_CONTEXTPOPUP = 8;
{$EXTERNALSYM HELP_FORCEFILE}
HELP_FORCEFILE = 9;
{$EXTERNALSYM HELP_KEY}
HELP_KEY = 257; { Display topic for keyword in offabData }
{$EXTERNALSYM HELP_COMMAND}
HELP_COMMAND = 258;
{$EXTERNALSYM HELP_PARTIALKEY}
HELP_PARTIALKEY = 261;
{$EXTERNALSYM HELP_MULTIKEY}
HELP_MULTIKEY = 513;
{$EXTERNALSYM HELP_SETWINPOS}
HELP_SETWINPOS = 515;
{$EXTERNALSYM HELP_CONTEXTMENU}
HELP_CONTEXTMENU = 10;
{$EXTERNALSYM HELP_FINDER}
HELP_FINDER = 11;
{$EXTERNALSYM HELP_WM_HELP}
HELP_WM_HELP = 12;
{$EXTERNALSYM HELP_SETPOPUP_POS}
HELP_SETPOPUP_POS = 13;
const
{$EXTERNALSYM HH_DISPLAY_TOPIC }
HH_DISPLAY_TOPIC = 0;
{$EXTERNALSYM HH_HELP_FINDER }
HH_HELP_FINDER = 0;
{$EXTERNALSYM HH_DISPLAY_TOC }
HH_DISPLAY_TOC = 1;
{$EXTERNALSYM HH_DISPLAY_INDEX }
HH_DISPLAY_INDEX = 2;
{$EXTERNALSYM HH_DISPLAY_SEARCH }
HH_DISPLAY_SEARCH = 3;
{$EXTERNALSYM HH_SET_WIN_TYPE }
HH_SET_WIN_TYPE = 4;
{$EXTERNALSYM HH_GET_WIN_TYPE }
HH_GET_WIN_TYPE = 5;
{$EXTERNALSYM HH_GET_WIN_HANDLE }
HH_GET_WIN_HANDLE = 6;
{$EXTERNALSYM HH_ENUM_INFO_TYPE }
HH_ENUM_INFO_TYPE = 7;
{$EXTERNALSYM HH_SET_INFO_TYPE }
HH_SET_INFO_TYPE = 8;
{$EXTERNALSYM HH_SYNC }
HH_SYNC = 9;
{$EXTERNALSYM HH_KEYWORD_LOOKUP }
HH_KEYWORD_LOOKUP = $d;
{$EXTERNALSYM HH_DISPLAY_TEXT_POPUP }
HH_DISPLAY_TEXT_POPUP = $e;
{$EXTERNALSYM HH_HELP_CONTEXT }
HH_HELP_CONTEXT = $f;
{$EXTERNALSYM HH_TP_HELP_CONTEXTMENU }
HH_TP_HELP_CONTEXTMENU = $10;
{$EXTERNALSYM HH_TP_HELP_WM_HELP }
HH_TP_HELP_WM_HELP = $11;
{$EXTERNALSYM HH_CLOSE_ALL }
HH_CLOSE_ALL = $12;
{$EXTERNALSYM HH_ALINK_LOOKUP }
HH_ALINK_LOOKUP = $13;
{$EXTERNALSYM HH_GET_LAST_ERROR }
HH_GET_LAST_ERROR = $14;
{$EXTERNALSYM HH_ENUM_CATEGORY }
HH_ENUM_CATEGORY = $15;
{$EXTERNALSYM HH_ENUM_CATEGORY_IT }
HH_ENUM_CATEGORY_IT = $16;
{$EXTERNALSYM HH_RESET_IT_FILTER }
HH_RESET_IT_FILTER = $17;
{$EXTERNALSYM HH_SET_INCLUSIVE_FILTER }
HH_SET_INCLUSIVE_FILTER = $18;
{$EXTERNALSYM HH_SET_EXCLUSIVE_FILTER }
HH_SET_EXCLUSIVE_FILTER = $19;
{$EXTERNALSYM HH_INITIALIZE }
HH_INITIALIZE = $1c;
{$EXTERNALSYM HH_UNINITIALIZE }
HH_UNINITIALIZE = $1d;
{$EXTERNALSYM HH_SET_QUERYSERVICE }
HH_SET_QUERYSERVICE = $1e;
{$EXTERNALSYM HH_PRETRANSLATEMESSAGE }
HH_PRETRANSLATEMESSAGE = $fd;
{$EXTERNALSYM HH_GLOBALPROPERTY }
HH_GLOBALPROPERTY = $fc;