What is the c++ approach for upgrading these c style casts for HtmlHelp
API?
void CMeetingScheduleAssistantApp::DisplayHelpTopic(CString strTopic)
{
CString strURL = _T("https://help-msa.publictalksoftware.co.uk/") + strTopic;
if (theApp.UseDownloadedHelpDocumentation())
{
// CHM files use 3 letter suffix
strTopic.Replace(_T(".html"), _T(".htm"));
HtmlHelp((DWORD_PTR)(LPCTSTR)strTopic, HH_DISPLAY_TOPIC);
}
else
ShellExecute(nullptr, nullptr, strURL, nullptr, nullptr, SW_SHOWDEFAULT);
}
Specifically:
HtmlHelp((DWORD_PTR)(LPCTSTR)strTopic, HH_DISPLAY_TOPIC);
In answer to the question in the comments:
It is odd because the official docs for x86 HtmlHelpA
/ HtmlHelpW
do indicate different calls.
It doesn't seem to be listed as part of the CWinApp
class in the docs.