CMFCToolBar::GetRouteCommandsViaFrame

Determines which object, the parent frame or the owner, sends commands to the toolbar.

BOOL GetRouteCommandsViaFrame();

Return Value

Nonzero if the parent frame sends commands to the toolbar; 0 if the owner sends commands to the toolbar.

Remarks

By default, the parent frame sends commands to the toolbar. Call CMFCToolBar::SetRouteCommandsViaFrame to change this behavior.

If this method returns a nonzero value, you can retrieve a pointer to the parent frame object by using the CMFCToolBar::GetCommandTarget method. See the VisualStudioDemo sample for an example that uses this method.

Requirements

Header: afxtoolbar.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCToolBar Class

CMFCToolBar::SetRouteCommandsViaFrame