J
Jon Slaughter
I'm trying to wrap all the basic controls(Button, scrollbar, etc..) to allow
for skinning. The problem is that many of the controls seem so different in
the way they work. For example, right now I'm trying to wrap teh scrollbar
class but when I override the OnPaint and OnPaintBackground prevent painting
the scrollbar is still painted. How the heck am I suppose to know how to do
these things if I can't find the information about how they work? I would
expect when I override these functions I would prevent the scrollbar from
drawing itself but this doesn't seem to be the case ;/ (while it is the case
for the button)
Ok, so maybe the scrollbar paints in a different way? Maybe the scrollbar
uses teh Controls property to hold the buttons and stuff but still, how does
it paint itself then? When I override the paint methods shouldn't I expect
that no painting should be performed?
It looks like I will have to just implement a new scrollbar class but then
it will be difficult to support the themes of the os? I figured that it
would be very easy just to override the painting and hit tests along with a
few others if I a flag was set and draw a better looking scrollbar that
functions the same way as the original but can easily be turned off. One
could easily refactor it into a program without making any programmatic
changest to support the new look too. But again, I'm running into trouble
trying to figure out what MS did. MSDN doesn't help as it just gives me a
list of properties and methods for the class but not how the class actually
works. (like if they forgot to make the OnPaint virtual so I could override
it)
any ideas? Anywhere I can find some info on this topic that will help clear
up some of my confusion?
Thanks,
Jon
for skinning. The problem is that many of the controls seem so different in
the way they work. For example, right now I'm trying to wrap teh scrollbar
class but when I override the OnPaint and OnPaintBackground prevent painting
the scrollbar is still painted. How the heck am I suppose to know how to do
these things if I can't find the information about how they work? I would
expect when I override these functions I would prevent the scrollbar from
drawing itself but this doesn't seem to be the case ;/ (while it is the case
for the button)
Ok, so maybe the scrollbar paints in a different way? Maybe the scrollbar
uses teh Controls property to hold the buttons and stuff but still, how does
it paint itself then? When I override the paint methods shouldn't I expect
that no painting should be performed?
It looks like I will have to just implement a new scrollbar class but then
it will be difficult to support the themes of the os? I figured that it
would be very easy just to override the painting and hit tests along with a
few others if I a flag was set and draw a better looking scrollbar that
functions the same way as the original but can easily be turned off. One
could easily refactor it into a program without making any programmatic
changest to support the new look too. But again, I'm running into trouble
trying to figure out what MS did. MSDN doesn't help as it just gives me a
list of properties and methods for the class but not how the class actually
works. (like if they forgot to make the OnPaint virtual so I could override
it)
any ideas? Anywhere I can find some info on this topic that will help clear
up some of my confusion?
Thanks,
Jon