  We study the question for which Tychonoff spaces $X$ and locally convex
spaces $E$ the space $C_p(X,E)$ of continuous $E$-valued functions on $X$
contains a complemented copy of the space
$(c_0)_p=\{x\in\mathbb{R}^\omega\colon x(n)\to0\}$, both endowed with the
pointwise topology. We provide a positive answer for a vast class of spaces,
extending classical theorems of Cembranos, Freniche, and Doma\'nski and
Drewnowski, proved for the case of Banach and Fr\'echet spaces $C_k(X,E)$.
Also, for given infinite Tychonoff spaces $X$ and $Y$, we show that
$C_p(X,C_p(Y))$ contains a complemented copy of $(c_0)_p$ if and only if any of
the spaces $C_p(X)$ and $C_p(Y)$ contains such a subspace.
