We have studied the ordering behavior of a (diblock copolymer, poly(styrene-ds)-poly(2-vinylpyridine) (dPS-PVP), in a confined geometry by neutron reflectivity, transmission electron microscopy, and atomic force microscopy. The diblock copolymer was confined between a silicon substrate (Si) on one side and a glassy polymer, poly(2-methylvinylcyclohexane) (P2MVCH), on the other side. In such a geometry, incompatibility between the natural domain period of the diblock copolymer (D*) and the film thickness (L) creates frustration that can be varied by controlling the copolymer film thickness. As the degree of frustration is increased (i.e., film thickness is decreased), the domain periods of the lamellae become progressively distorted from D*, and the lamellae orient with dPS/PVP interfaces parallel to the confining surfaces. The dPS block wets the P2MVCH confining wall and the PVP block wets the Si substrate. There is a limit, however, to the extent of distortion of the lamellar domain period; a further increase in frustration results in a sharp transition to a complex layered morphology that has a heterogeneous in-plane structure adjacent to the P2MVCH confining wall. In this morphology, both the dPS and PVP are located near the P2MVCH confining wall and only PVP is located at the Si confining wall. The sharp transition in the morphology is interpreted in the context of competing surface and bulk interactions. By removal of one of the confining walls, the frustration is relieved and a lamellar structure parallel to the surfaces is recovered with a domain period of D*.