For the cockpit it is usually installed as an assembly before the fusalage goes together and you would want to finish it before installing. Almost like it was a kit unto itself. Then for sure you will want to protect it before doing any painting or other work outdide of it. Trying to fix something like overspray inside the cockpit at that point would be a nightmare.
I use a product called Parafilm M. for the canopy.
http://www.micromark.com/PARAFILM-M,7551.html
You cut off a bit, give it a stretch, then apply it over the canopy. It is low tack but clings to the surface. You then use a SHARP hobby knife to trace out the canopy frames and remove the parts to be painted. It is easily removed after painting. Some also cut small strips of masking tape to mask off the areasto be protected. There are other methods to be sure, but regardless it is undesireable to try to remove paint from clear canopy parts no matter the type of paint you use-most often you will mar or scratch it.
Check out some of the basic books available at your hobby shop or the pages of...should I say it?
Fine Scale Modeler!
(No this was not a paid endorsement! I have been reading it since the late 80's!)