本文整理汇总了C++中HtmlHelp函数的典型用法代码示例。如果您正苦于以下问题:C++ HtmlHelp函数的具体用法?C++ HtmlHelp怎么用?C++ HtmlHelp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HtmlHelp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TYPESAFE_DOWNCAST
//
/// Called by EvHelp() to activate the help file with the help context ID.
//
void
THelpFileManager::ActivateHelp(TWindow* /*window*/, int helpFileContextId, uint helpCmd)
{
if (helpCmd == HELP_INDEX || helpCmd == HELP_CONTENTS)
helpCmd = HELP_FINDER;
TApplication* app = TYPESAFE_DOWNCAST(this, TApplication);
#if !defined(NO_HTMLHELP)
if(UseHTMLHelp){
if (app)
HelpState = ToBool(HtmlHelp(app->GetMainWindow(), GetHelpFile().c_str(),
helpCmd, helpFileContextId) != 0);
else
HelpState = ToBool(HtmlHelp(0, GetHelpFile().c_str(),
helpCmd, helpFileContextId) != 0);
}
else{
#endif
if (app)
HelpState = ToBool(app->GetMainWindow()->WinHelp(GetHelpFile().c_str(),
helpCmd, helpFileContextId));
else
HelpState = ToBool(::WinHelp(0, GetHelpFile().c_str(),
helpCmd, helpFileContextId));
#if !defined(NO_HTMLHELP)
}
#endif
}
示例2: ZeroMemory
void fsContextHelpMgr::OnWT()
{
if (m_bInWT)
return;
if (m_iLastCtrl == -1)
return;
m_bInWT = TRUE;
HH_POPUP popup;
ZeroMemory (&popup, sizeof (popup));
popup.cbStruct = sizeof (popup);
popup.pszText = m_pLastCtrls [m_iLastCtrl].pszDesc;
popup.pt = m_ptLast;
popup.clrForeground = UINT (-1);
popup.clrBackground = UINT (-1);
popup.rcMargins = CRect (-1, -1, -1, -1);
popup.pszFont = _T("MS Sans Serif, 8, DEFAULT_CHARSET");
HtmlHelp (m_pLastDlg->m_hWnd, NULL, HH_DISPLAY_TEXT_POPUP, (DWORD) &popup);
m_bInWT = FALSE;
}
示例3: ParamHelp
void ParamHelp( UINT nTech )
{
CString strTech = AfxGetSTTShortName( nTech );
if( !strTech.IsEmpty() )
strTech = "#" + strTech;
HtmlHelp(NULL, "StockAna.chm::/htm/techs.htm" + strTech, HH_DISPLAY_TOPIC, 0);
}
示例4: notifier_wnd_proc
static LRESULT CALLBACK
notifier_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == TOKEN_MESSAGE_ID) {
switch (lParam) {
case NIN_SELECT:
case NIN_KEYSELECT:
{
NOTIFYICONDATA idata;
khm_int32 cmd = KHUI_ACTION_OPEN_APP;
khc_read_int32(NULL, L"CredWindow\\NotificationAction", &cmd);
khui_action_trigger(cmd, NULL);
ZeroMemory(&idata, sizeof(idata));
Shell_NotifyIcon(NIM_SETFOCUS, &idata);
}
return 0;
case WM_CONTEXTMENU:
handle_context_menu();
return TRUE;
default:
return 0;
}
}
else if (uMsg == WM_COMMAND) {
switch (LOWORD(wParam)) {
case ID_DEFAULT:
{
khm_int32 cmd;
cmd = get_default_notifier_action();
khui_action_trigger(cmd, NULL);
}
return TRUE;
case ID_SHOWHELP:
{
wchar_t helploc[MAX_PATH + MAX_PATH];
get_help_file(helploc, sizeof(helploc));
StringCbCat(helploc, sizeof(helploc), L"::index.html");
HtmlHelp(notifier_window, helploc, HH_DISPLAY_TOPIC, 0);
}
return TRUE;
}
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
示例5: ShowHelpWindow
void ShowHelpWindow(HWND hwnd, LPCWSTR topicFile)
{
UString path;
if (!::GetProgramFolderPath(path))
return;
path += kHelpFileName;
path += topicFile;
HtmlHelp(hwnd, GetSystemString(path), HH_DISPLAY_TOPIC, NULL);
}
示例6: HtmlHelp
void CCopyHandlerApp::OnResManNotify(UINT uiType)
{
if (uiType == RMNT_LANGCHANGE)
{
// language has been changed - close the current help file
if (UpdateHelpPaths())
HtmlHelp(NULL, HH_CLOSE_ALL);
}
}
示例7: HtmlHelp
void CWZPropertyPage::ShowHelp(const CString &topicFile)
{
if (!app.GetHelpFileName().IsEmpty()) {
const CString cs_HelpTopic = app.GetHelpFileName() + topicFile;
HtmlHelp(DWORD_PTR((LPCWSTR)cs_HelpTopic), HH_DISPLAY_TOPIC);
} else {
CGeneralMsgBox gmb;
gmb.AfxMessageBox(IDS_HELP_UNAVALIABLE, MB_ICONERROR);
}
}
示例8: UTIL_GetInstallPath
void CCeWatchDlg::WinHelp(DWORD dwData, UINT nCmd)
{
HWND hWnd = ::GetActiveWindow();
CString strManualPath;
UINT nStrLen = _MAX_PATH;
HRESULT hr = UTIL_GetInstallPath(strManualPath.GetBuffer(_MAX_PATH), &nStrLen);
strManualPath.ReleaseBuffer();
if(SUCCEEDED(hr))
{
strManualPath += CE_MANUAL_FILENAME;
switch(nCmd)
{
case HELP_CONTEXT:
if(dwData >= 0x30000)
{
dwData -= 0x30000;
}
else if(dwData >= 0x20000)
{
dwData -= 0x20000;
}
else if(dwData >= 0x10000)
{
dwData -= 0x10000;
}
HtmlHelp(hWnd, strManualPath, HH_HELP_CONTEXT, dwData);
break;
case HELP_INDEX:
break;
case HELP_FINDER:
HtmlHelp(hWnd, strManualPath, HH_DISPLAY_TOPIC, NULL);
break;
}
}
// CDialog::WinHelp(dwData, nCmd);
}
示例9: RASBlinkProperties_OnNotify
/* This function handles the WM_NOTIFY message.
*/
LRESULT FASTCALL RASBlinkProperties_OnNotify( HWND hwnd, int code, LPNMHDR lpnmhdr )
{
switch( lpnmhdr->code )
{
case PSN_HELP:
HtmlHelp( hwnd, szHelpFile, HH_HELP_CONTEXT, idsBLINK_RAS );
break;
case PSN_APPLY: {
LPBLINKENTRY lpbe;
HWND hwndTab;
/* Update the blink entry structure.
*/
lpbe = (LPBLINKENTRY)GetWindowLong( hwnd, DWL_USER );
hwndTab = PropSheet_GetTabControl( GetParent( hwnd ) );
if( !TabCtrl_GetEnable( hwndTab, idRasTab ) )
lpbe->rd.fUseRAS = FALSE;
else
lpbe->rd.fUseRAS = IsDlgButtonChecked( hwnd, IDD_USERAS );
/* If we use RAS, we'll need the entry name.
*/
if( lpbe->rd.fUseRAS )
{
HWND hwndList;
/* Get the entry name.
*/
hwndList = GetDlgItem( hwnd, IDD_LIST );
ComboBox_GetText( hwndList, lpbe->rd.szRASEntryName, RAS_MaxEntryName+1 );
/* Get username and password.
*/
Edit_GetText( GetDlgItem( hwnd, IDD_USERNAME ), lpbe->rd.szRASUserName, UNLEN+1 );
Edit_GetText( GetDlgItem( hwnd, IDD_PASSWORD ), lpbe->rd.szRASPassword, PWLEN+1 );
if( ( strlen( lpbe->rd.szRASEntryName ) == 0 ) || ( strlen( lpbe->rd.szRASUserName ) == 0 ) || ( strlen( lpbe->rd.szRASPassword ) == 0 ) )
{
fMessageBox( hwnd, 0, GS(IDS_STR1242), MB_OK|MB_ICONEXCLAMATION );
return( PSNRET_INVALID_NOCHANGEPAGE );
}
Amuser_Encrypt( lpbe->rd.szRASPassword, rgEncodeKey );
}
/* Force the Apply button to be disabled.
*/
PropSheet_UnChanged( GetParent( hwnd ), hwnd );
return( PSNRET_NOERROR );
}
}
return( FALSE );
}
示例10: ATLASSERT
void CFirstStartWizardAuthentication::OnClickedLink(NMHDR* pNMHDR, LRESULT* pResult)
{
ATLASSERT(pNMHDR && pResult);
auto pNMLink = reinterpret_cast<PNMLINK>(pNMHDR);
if (wcscmp(pNMLink->item.szID, L"manual") == 0)
HtmlHelp(0x20000 + IDD_FIRSTSTARTWIZARD_AUTHENTICATION);
else if (wcscmp(pNMLink->item.szID, L"sshfaq") == 0)
{
CString helppath(theApp.m_pszHelpFilePath);
helppath += L"::/tgit-ssh-howto.html";
::HtmlHelp(GetSafeHwnd(), helppath, HH_DISPLAY_TOPIC, 0);
}
*pResult = 0;
}
示例11: view_help_screen
//*************************************************************
void view_help_screen(HWND hwnd)
{
char msgstr[81] ;
find_chm_location() ;
wsprintf(msgstr, "help=[%s]", chmname) ;
put_message(msgstr) ;
// MinGw gives a couple of indecipherable warnings about this:
// Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
// Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
// But ignoring them doesn't seem to hurt anything...
HtmlHelp(hwnd, chmname, HH_DISPLAY_TOPIC, 0L);
return ;
}
示例12: notifier_wnd_proc
static LRESULT CALLBACK
notifier_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == TOKEN_MESSAGE_ID) {
switch (lParam) {
case NIN_SELECT:
case NIN_KEYSELECT:
handle_select();
return TRUE;
case WM_CONTEXTMENU:
handle_context_menu();
return TRUE;
default:
return FALSE;
}
}
else if (uMsg == WM_COMMAND) {
switch (LOWORD(wParam)) {
case ID_DEFAULT:
{
khm_int32 cmd;
cmd = get_default_notifier_action();
khui_action_trigger(cmd, NULL);
}
return TRUE;
case ID_SHOWHELP:
{
afs_html_help(notifier_window, L"::/html/welcome.htm", HH_DISPLAY_TOPIC, 0);
}
return TRUE;
case ID_RELEASENOTES:
{
wchar_t relnotes[MAX_PATH];
if (get_release_notes(relnotes))
HtmlHelp(GetDesktopWindow(), relnotes, HH_DISPLAY_TOC, 0);
}
return TRUE;
}
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
示例13: ShowHtmlHelp
/**
* @brief Show HTML help.
* This function shows HTML help, with given command and path.
* @param [in] uCommand How/what to open in help (TOC etc).
* @param [in] path Additional relative path inside help file to open.
* @param [in] hParentWindow Window opening this help.
*/
void ShowHtmlHelp(UINT uCommand, LPCTSTR path, HWindow *pParentWindow)
{
TCHAR fullHelpPath[MAX_PATH];
GetModuleFileName(NULL, fullHelpPath, MAX_PATH);
PathRemoveFileSpec(fullHelpPath);
PathAppend(fullHelpPath, HtmlHelpFile);
if (!PathFileExists(fullHelpPath))
{
TCHAR msg[500];
_sntprintf(msg, RTL_NUMBER_OF(msg), GetLangString(IDS_ERR_HELP_NOT_FOUND), fullHelpPath);
MessageBox(pParentWindow, msg, MB_ICONERROR);
return;
}
if (uCommand == HELP_CONTEXT)
{
if (path != NULL)
{
TCHAR fullpath[MAX_PATH] = {0};
_sntprintf(fullpath, MAX_PATH, _T("%s::/%s"), fullHelpPath, path);
HtmlHelp(NULL, fullpath, HH_DISPLAY_TOPIC, NULL);
}
else
{
HtmlHelp(NULL, fullHelpPath, HH_DISPLAY_TOPIC, NULL);
}
}
else if (uCommand == HELP_FINDER)
{
HtmlHelp(NULL, fullHelpPath, HH_DISPLAY_SEARCH, NULL);
}
else if (uCommand == HELP_CONTENTS)
{
HtmlHelp(NULL, fullHelpPath, HH_DISPLAY_TOC, NULL);
}
}
示例14: PrintOutbasketDlg_DlgProc
/* This function handles the dialog box messages passed to the Print Message
* dialog.
*/
LRESULT FASTCALL PrintOutbasketDlg_DlgProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
switch( message )
{
HANDLE_MSG( hwnd, WM_INITDIALOG, PrintOutbasketDlg_OnInitDialog );
HANDLE_MSG( hwnd, WM_COMMAND, PrintOutbasketDlg_OnCommand );
case WM_ADMHELP:
HtmlHelp( hwnd, szHelpFile, HH_HELP_CONTEXT, idsPRINTOUTBASKET );
break;
default:
return( DefDlgProcEx( hwnd, message, wParam, lParam, &fDefDlgEx ) );
}
return( FALSE );
}
示例15: CmdSignatureDlg_DlgProc
/* This function dispatches messages for the About dialog.
*/
LRESULT FASTCALL CmdSignatureDlg_DlgProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
switch( message )
{
HANDLE_MSG( hwnd, WM_INITDIALOG, CmdSignatureDlg_OnInitDialog );
HANDLE_MSG( hwnd, WM_COMMAND, CmdSignatureDlg_OnCommand );
case WM_ADMHELP:
HtmlHelp( hwnd, szHelpFile, HH_HELP_CONTEXT, idsSIGNATURE );
break;
default:
return( DefDlgProcEx( hwnd, message, wParam, lParam, &fDefDlgEx ) );
}
return( FALSE );
}