CWnd::SetWindowContextHelpId

指定されたウィンドウに、ヘルプ コンテキスト識別子を関連付けます。

BOOL SetWindowContextHelpId(
   DWORD dwContextHelpId 
);

パラメーター

  • dwContextHelpId
    ヘルプ コンテキスト識別子。

戻り値

正常終了した場合は 0 以外を返します。それ以外の場合は 0 を返します。

解説

子ウィンドウにヘルプ コンテキスト識別子がない場合は、親ウィンドウの識別子を継承します。 同じように、所有しているウィンドウにヘルプ コンテキスト識別子がない場合は、オーナー ウィンドウの識別子を継承します。 ヘルプ コンテキスト識別子を継承することで、アプリケーションは、ダイアログ ボックスとそのすべてのコントロールに対して 1 つの識別子を設定できます。

使用例

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

必要条件

**ヘッダー:**afxwin.h

参照

参照

CWnd クラス

階層図

CWnd::GetWindowContextHelpId

概念

CWnd のメンバー