Export (0) Print
Expand All
MFC
Expand Minimize
This topic has not yet been rated - Rate this topic

CWnd::SetWindowContextHelpId

Call this member function to associate a help context identifier with the specified window.

BOOL SetWindowContextHelpId(
   DWORD dwContextHelpId 
);
dwContextHelpId

The help context identifier.

Nonzero if the function is successful; otherwise 0.

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.


// 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);


Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.