We consider the possible existence of gravitationally bound stringlike objects in the framework of the generalized hybrid metric-Palatini gravity theory, in which the gravitational action is represented by an arbitrary function of the Ricci and of the Palatini scalars, respectively. The theory admits an equivalent scalar-tensor representation in terms of two independent scalar fields. Assuming cylindrical symmetry, and the boost invariance of the metric, we obtain the gravitational field equations that describe cosmic stringlike structures in the theory. The physical and geometrical properties of the cosmic strings are determined by the two scalar fields, as well by an effective field potential, functionally dependent on both scalar fields. The field equations can be exactly solved for a vanishing, and a constant potential, respectively, with the corresponding string tension taking both negative and positive values. Furthermore, for more general classes of potentials, having an additive and a multiplicative algebraic structure in the two scalar fields, the gravitational field equations are solved numerically. For each potential we investigate the effects of the variations of the potential parameters and of the boundary conditions on the structure of the cosmic string. In this way, we obtain a large class of stable stringlike astrophysical configurations, whose basic parameters (string tension and radius) depend essentially on the effective field potential, and on the boundary conditions.