Hmm..
What I think you want is http://devkitpro.org/
This is basically the official "unofficial" devkit for nds that I think (most?) people use when making ds applications and homebrew, though I don't know for sure since I never entered that scene.
IIRC this guide should be somewhat helpful although I don't know if it was ever finished:
http://gbatemp.net/threads/ds-progra...ewbies.322106/
Lastly google seems to have a plethora of interesting examples, and I think there is a way to link the devkitpro tools to microsoft's C++ 2008 edition app so you can compile straight from within it.
Here is a (dated I think) tutorial to setting up everything with devKitPro and whatnot:
http://www.dev-scene.com/NDS/Tutorials_Day_1
Lastly, on a somewhat related tangent, you should check out this awesome open-source nds homebrew game:
http://smealum.net/ASDS/
It's Portal (valve) but written for the NDS by some dude.
I haven't played it, and assume the source code is rather complex, but it is an interesting and cool game.
It's basically Portal coded for the DS.
I hope this helps somewhat xD
Good luck
EDIT:
I've also found this:
http://www.patater.com/manual
Seems to have a pretty thorough and extensive guide to coding with the NDS.
EDIT2:
Whoops, just realized I bumped a super old thread XD
Sorry about that :P lol