Open Options|Preferences and select the “Control Surfaces” item. Select Add to create a control surface. Choose a device (a control surface definition), a MIDI input and a MIDI output. You may also edit existing control surfaces or remove them.
Some control surfaces have dedicated MIDI inputs and outputs (like the Frontier TranzPort). In this case, you do not need to choose ports as they are already known.