Поделиться через


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

См. также

Основные понятия

CWnd Class

CWnd Members

Hierarchy Chart

CWnd::GetWindowContextHelpId