CWnd::SetWindowContextHelpId
Visual Studio 2005
Call this member function to associate a help context identifier with the specified window.
BOOL SetWindowContextHelpId( DWORD dwContextHelpId );
Parameters
- dwContextHelpId
-
The help context identifier.
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.
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
//...
// 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);
pWndl->SetWindowContextHelpId(HIDC_TESTHELP_CONTROL);
return TRUE;
// Return TRUE unless you set the focus to a control.
// EXCEPTION: OCX Property Pages should return FALSE.
}