How to dock several control bars into one row so that they share its space in certain proportions?

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

To get resizable control bars docked with the frame edge so that they share the common background in certain proportions, just use the CExtControlBar::DockControlBarLTRB() method. For instance, you need to dock three control bars into one row and the first two of them should occupy 33 percent of the row length, and the third -- 34% (33+33+34=100%). Start with the third control bar and dock it by using the DockControlBarInnerOuter() method, which will make it occupy 100% of the row. Then, dock the second relative to third control bar with the DockControlBarLTRB() method and specify 66% as its share. Now the third bar occupies 34% of the row and the second -- 66%. Finally, dock the first control bar by using DockControlBarLTRB() and specify 50% of the space occupied by the second control. Here is a code snippet:

// dock Bar3 in an entirely new row at bottom
    pBar3->DockControlBarInnerOuter(
      AFX_IDW_DOCKBAR_BOTTOM,
      true,
      this,
      true
      );
    // make the second share 66% of 3d on the left
    pBar2->DockControlBarLTRB(
      66,
      pBar3,
      AFX_IDW_DOCKBAR_LEFT,
      true
      ); 
    // make the first share 50% of 2d
    // on the left that is equal to
    // 33% of the entire row
    pBar1->DockControlBarLTRB(
      50,
      pBar2,
      AFX_IDW_DOCKBAR_LEFT,
      true
      );

After that, three control bars are docked as it is depicted below: