You can't overload the assignment operator for std::function if that's what you're trying to do. If Paint is a public variable you should be able to assign to it directly but that won't call Refresh().
Because you are overloading Form::operator=. Assigning to frMain.Paint will use std::function<void(HDC WindowHDC)>::operator= but you can't overload that.
is like i had created a property default using 'std::function<void(HDC WindowHDC)>'.. strange.
but without a member is useless :(
but the frMain it's a Form and not 'std::function<void(HDC WindowHDC)>'
i never used C#.
i'm trying simplificate some things.
but you have right, too: we have learned that after change the Paint, we must then Refresh the Window for see it. but i was trying do it in just 1 step. but your idea was the best. thank you so much