Help Center

CToolbar.SetParentmethod

Sets the window to which the toolbar control sends notification messages.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION SetParent (BYVAL hToolbar AS HWND, BYVAL hwndParent AS HWND) AS HWND

Parameters

NameDescription
hToolbarHandle to the toolbar control.
hwndParentHandle to the window to receive notification messages.

Return value

The return value is a handle to the previous notification window, or NULL if there is no previous notification window.

Description

Sets the window to which the toolbar control sends notification messages.

Remarks

The TB_SETPARENT message does not change the parent window that was specified when the control was created. Calling the GetParent function for a toolbar control will return the actual parent window, not the window specified in TB_SETPARENT. To change the control's parent window, call the SetParent function.

Reference

  • Include file CToolbar.inc
  • Defined in AfxNova/CToolbar.inc:1236
  • Documented in Windows/WIndows Controls/CToolbar Class.md
  • Topic: CToolbar Class