共用方式為


CWinApp::m_pszHelpFilePath

包含應用程式的路徑的說明檔。

LPCTSTR m_pszHelpFilePath;

備註

根據預設,架構會使用 m_pszHelpFilePath 至應用程式的名稱並加上「Result」的 .HLP 的。 若要變更說明檔的名稱,請將 m_pszHelpFilePath 指向包含所需的說明檔完整名稱的字串。 若要進行這項作業的便利位置在應用程式的 InitInstance 函式。 m_pszHelpFilePath 是型別 **const char***的公用變數。

注意事項注意事項

如果您將值指派給 m_pszHelpFilePath,在堆積上必須動態配置它。CWinApp 解構函式呼叫 free() 與這個指標。您想要使用許多 _tcsdup() 執行階段程式庫函式會配置。此外,請釋放記憶體與目前指標在指派新值以前。例如:

//First free the string allocated by MFC at CWinApp startup.
//The string is allocated before InitInstance is called.
free((void*)m_pszHelpFilePath);
//Change the name of the .HLP file.
//The CWinApp destructor will free the memory.
m_pszHelpFilePath = _tcsdup(_T("c:\\somedir\\myhelp.hlp"));

需求

Header: afxwin.h

請參閱

參考

CWinApp 類別

階層架構圖