Using Constraints with the Navigational Arrows Control

You can use constraints to position the navigational arrows control, which is a control that indicates the active direction keys. For more information about the navigational arrows control, see “Using Auto PC Simple Controls.”

To position the navigational arrows control, use a CONTROL statement with a control class of “APC_NavArrows.” This process does not actually create a navigational arrows control, but binds the control to the existing one created by the form. The following code example shows how to hide the navigational arrows control if it is not needed on a form.

   CONTROL     "Nav Arrows", IDC_NAVARROWS,"APC_NavArrows",NOT
               WS_VISIBLE,
               0,0,0,0

The following code example shows how to center a navigational arrows control vertically at the right of the form.

   CONTROL     "Nav Arrows", IDC_NAVARROWS,"APC_NavArrows",
               WS_VISIBLE,
               0,0,0,0
   BEGIN
      FA_VERTICAL_CENTER, FA_RIGHT_OF_FORM
   END

Even though only two constraints were specified, the layout engine can position the control because uses it the natural size of the navigational arrows control in determining how to position it.