CWnd::SetWindowContextHelpId
Call this member function to associate a help context identifier with the specified window.
BOOL SetWindowContextHelpId(
DWORD dwContextHelpId
);
Parameters
- dwContextHelpId
The help context identifier.
Return Value
Nonzero if the function is successful; otherwise 0.
Remarks
If a child window does not have a help context identifier, it inherits the identifier of its parent window. Likewise, if an owned window does not have a help context identifier, it inherits the identifier of its owner window. This inheritance of help context identifiers allows an application to set just one identifier for a dialog box and all of its controls.
Example
// The following code fragment is from CMyDlg::OnInitDialog
// CMyDlg is derived from CDialog.
// Associate a help context id with the control.
// IDC_TESTHELP_CONTROL is the id of the control
// and HIDC_TESTHELP_CONTROL is its help context
// id associated with the control.
CWnd* pWnd = GetDlgItem(IDC_TESTHELP_CONTROL);
pWnd->SetWindowContextHelpId(HIDC_TESTHELP_CONTROL);
Requirements
Header: afxwin.h