Are there any tutorials on how to create a sketch pad ?

I have downloaded some samples but had problems understanding them.
I can write the application to draw lines or curves separately,
but I am having problems putting it all together i.e. Buttons to draw lines, curves or freehand.

I have 4 buttons 1.Line , 2.Curve, 3.freehand 4.New
Once a line, curve or freehand has been started, if the user clicks on a button and the next object is continued from the last point.
e.g. a user draws a line than clicks the curve button now a curve is drawn from the last point, this continues until the new button is selected.