First I installed this driver:
Then I opened Midi Designer on my iPad and created my buttons

I opened Sonar and under utilities>ACT MIDI Contoller. I chose the commands I wanted for each botton in the Sonar window and clicked on them so that they would "learn" which button on Midi Designer activated which command.

Granted I had to tweek it a little, but that was basically it. I hope this helps.