|Well, maybe still not very clear in my previous reply.
I included a picture of the button control I've been
writing for fun.
It's a small button that draw everything from scratch. I plan a
few features for this button:
- support theme automatically. done! (Thanks for help from James T. Johnson)
- support shadowed text. done! (Thanks for great tutorials from Christian Graus)
- to able to draw underlying control, so it looks like transparent background is supported.
Well, that's why I come up with this question.
Though, I am able to use InvokePaint, InvokePaintBackground to redraw the
underlying parent control. Suddenly this question comes to my mind. If
I want to write another custom control that use this feature by using
InvokePaint. There is no way but inheriting it from Control Class.
Wouldn't it be better if I can write a static function, passing the caller
control and caller's parent control as parameter, then the function will
repaint caller control with the underlying parent's background.
Thanks in advance...
P.S. there's also another painting problem I found. illustrated in the included image.