There is a MIDI FX plug in called 'Event filter'.
If you have a midi track, right click the FX bin and select 'Insert Midi plug in' > Cakewalk FX > Midi Plug in > Cakewalk Midi Event Filter.
If you have an instrument track, press I to open the track insector, select midi in the bottom right corner. The the Midi FX bin is above the fader. Select 'Insert Midi plug in' > Cakewalk FX > Midi Plug in > Cakewalk Midi Event Filter.
Then click on 'notes and set the range.