Are projections onto closed complemented subspaces of a topological vector space always continuous? Suppose $X$ is a topological vector space and $X = V \oplus W$ is a decomposition of $X$ into closed subspaces. The decomposition gives rise to a projection $P$ onto $V$ (depending on the choice of complement $W$):
\begin{equation} P:X \rightarrow X \\v+w \rightarrow v\end{equation}
Is $P$ continuous? It seems like it ought to be (and ought to be easy to show!), but I haven't been able to prove it.
I'm fairly sure that it's equivalent to show that the topology on $X$ is the same as the product topology on $V \oplus W$ (since in a preadditive category products=coproducts=biproducts)
I'm interested in the result for an application to the space of test functions on a domain, which has a lot more structure than a general topological vector space (it's locally convex, locally bounded and has the Heine-Borel property but is not metrisable), so if anyone knows of/can think of a proof in that special case that would be great also.
 A: I'd like to point out first that in general the answer is that this is not true. Here's a counterexample which I think is due to Dieudonné: it appears as exercise 2 to section 6.5 on page 129 of the 1969 edition of his Foundations of Modern Analysis.
Let $(e_n)_{n \in \mathbb{N}}$ be an orthonormal basis of the Hilbert space $H$.
Set $v_n = e_{2n}$ and $w_n = e_{2n}+\frac1{n+1} e_{2n+1}$ and let $V$ and $W$ be the closed linear spans of $\{v_n : n \in \mathbb N\}$ and $\{w_n : n \in \mathbb{N}\}$, respectively.
Then $V \cap W = \{0\}$ and thus their sum $X = V + W$  in $H$ is the algebraic direct sum of $V$ and $W$. Moreover, $V = V \cap X$ and $W = W \cap X$ are closed in $X$ with respect to the subspace topology of $X$ in $H$. 
However, the projection $P \colon X \to X$ of $X$ onto $V$ along $W$ is not continuous. Indeed, $x_n = v_n - w_n = -\frac{1}{n+1} e_{2n+1} \to 0$, while $P(x_n) = v_n = e_{2n} \nrightarrow 0$.
The issue here is that $X$ is dense but not closed in $H$: The element $\sum_{n=0}^\infty (v_n - w_n)$ of $H$ does not belong to $X$.

What is true is that your question is equivalent to showing that $X$ carries the product topology of $V$ and $W$. Spelling out the categorical formulation you gave explicitly, this is because continuity of $P$ implies that $x \mapsto (Px, x- Px)$ is a continuous map $X \to V \times W$ with continuous inverse $(v,w) \mapsto v + w$. Conversely, if $X \cong V \times W$ then the projections onto $V$ and $W$ are continuous.

Edit: For the space $\mathscr{D}(\Omega)$ of test functions Corollary 5.3.5 on page 96 of Jarchow, Locally convex spaces applies. Quoting directly:

Corollary 5. Suppose the Hausdorff tvs $E$ is the inductive limit of a sequence of complete metrizable tvs. Let $(E_1, E_2)$ be a linearly complemented pair of subspaces of $E$. If $E_1$ and $E_2$ are sequentially closed, then they are topologically complemented (and hence even closed).

In fact, choosing an exhaustion $K_n \subset \operatorname{int} K_{n+1}$ of $\Omega$ by compact sets with non-empty interior, the space $\mathscr{D}(K_n)$ of functions with support in $K_n$ is a closed subspace of the completely metrizable space $C^\infty(\Omega)$, so it is complete and $\mathscr{D}(\Omega) = \varinjlim \mathscr{D}(K_n)$ (see Jarchow, Example 4.6.3, page 83). By topologically complemented Jarchow means that the projections onto $E_1$ and $E_2$ are continuous (cf. page 77) which is what you want.
A: When $X$ is an $F-$space (in particular when $X$ is Banach) by the Closed Graph Theorem the claim follows. 
See Linear Operators Part I by Dunford and Schwartz VI.3 and Theorem II.2.4 for clarifications. 
