The APC40 has a Live mode and a generic MIDI mode. If it sends MIDI data it should be MIDI learn capable.
You could probably map the Matrix grid to the 40 pads, then the row of Live track buttons to the Matrix column headers, and the faders to the Sonar Mixer. It would be a kluge, but you could get some functionality I think.
Obviously not plug and play. So if that is too much trouble to configure, it does come with Live, so you could always use that!
I have Live, but don't use it. Makes my brain hurt!