We apply a Monte Carlo polymerization model for Gay-Berne monomers that we have recently introduced [J. Chem. Phys. 121, 9123 (2004)] to investigate with computer simulations the effects of nanoconfinement and anchoring type on the structure of the main chain liquid-crystal polymers formed in thin films, in the presence of several types of surface alignment: parallel to the interface (random and uniform) or perpendicular to it (homeotropic).We perform first a study of the confined monomers and then we examine the features of the polymer chains obtained from an isotropic or nematic sample. We find a significant effect of the anchoring conditions on the characteristics of the chains and particularly striking differences between planar and homeotropic boundaries. Furthermore, our results indicate that the choice of different anchorings could be used to tune the linearity and degree of polymerization of the chains.