I think one must be careful with this. I'd use that approach if my kid got a single bad grade among otherwise great grades in math. But I wouldn't tell her that if I knew she wasn't good at math - that would just be dishonest, and kids can tell.
My approach with my daughter is to praise her for things I've observed she's good at, and to make comments about the thing itself when I see her struggling. When she struggles with something, I encourage her by telling her that the thing itself is hard, instead of downplaying her ability to accomplish it. When applicable, I tell her it's hard even for me, as in "it's hard even for a 30-year old grown ass dude like me, so don't fret over it."
And finally, if I see her struggling with something I believe she shouldn't at her age (e.g. handwriting), I look up resources that will help me help her, or ultimately seek external help.