Given a unital C*-algebra $1\in\mathcal{A}$.
Denote selfadjoints: $$\mathcal{S}(\mathcal{H}):=\{A\in\mathcal{B}(\mathcal{H}):A=A^*\}$$
Introduce an order: $$A\leq A':\iff\sigma(A'-A)\geq0$$
Consider projections: $$P\in\mathcal{A}:\quad P^2=P=P^*$$
Then one has: $$P\leq A\leq 1\implies P=PA=AP$$
And equivalently: $$0\leq A\leq P\implies A=PA=AP$$
How can I check this?
You don't need the square, which gives you the additional step of justifying that $(1-A)^2\leq 1-A$. You can simply do, since $0\leq A\leq 1$ (because $P\leq A\leq Q$), $$ 0\leq P(1-A)P=P-PAP=0, $$ so $$ 0=P(1-A)P=[(1-A)^{1/2}P](1-A)^{1/2}P, $$ from where $(1-A)^{1/2}P=0$, and then $(1-A)P=0$.