Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IExtendControlbar::SetControlbar method

The IExtendControlbar::SetControlbar method attaches or detaches a control bar.

Syntax


HRESULT SetControlbar(
  [in] LPCONTROLBAR pControlbar
);

Parameters

pControlbar [in]

A pointer to an IControlbar interface on the control bar object to be set. A non-NULL value attaches a control bar; a NULL value detaches a control bar.

Return value

This method can return one of these values.

S_OK

The control bar was successfully attached or detached.

Remarks

As items are selected and deselected, snap-ins are activated and deactivated. When a snap-in is activated, the console calls SetControlbar with a non-NULL pControlbar value. The snap-in should call AddRef on this IControlBar. The snap-in should also use this opportunity to attach controls. Similarly, when the snap-in is deactivated, the console calls SetControlbar with a NULL pControlbar. The snap-in should then detach its controls and call Release on the saved IControlBar.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

See also

IToolbar

 

 

Show: