Have a look on planet source code for a program called
API Spyer I think

That should be a good start as it allows you to drag a pointer onto a handle, then you could easily put text in it...