How to specify that a toolbar bar can be docked only to a particular side(s) of the frame window?

Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

When initializing a toolbar bar (typically in CMainFrame::OnCreate()), you can limit its target docking location to one or more sides of the frame window by specifying one of the following constants in the EnableDocking() method of this toolbar:

Value Meaning
CBRS_ALIGN_TOP Top side of the frame window.
CBRS_ALIGN_BOTTOM Bottom side of the frame window.
CBRS_ALIGN_LEFT Left side of the frame window.
CBRS_ALIGN_RIGHT Right side of the frame window.
CBRS_ALIGN_ANY Any side of the frame window.

If you want your toolbar to be able to be docked to more than one side, use the bitwise inclusive OR operator, for example: