V
Verdagon
Hey everyone. I have this function in my form called "Display", which I
call every time the load, resize, and paint events are called. It works
fine on paint and resize, but on load it doesnt happen.
When the form loads, it draws what I want, but then after a few
milliseconds it disappears. It's being drawn over by something else.
What's drawing over it?
I've tried using SetStyle, and setting UserPaint and
AllPaintingInWmPaint, and that doesn't do anything. I've tried making
an override of OnPaint and commenting out "base.OnPaint(e)", but that
doesnt work. No matter what I do, my changes are drawn over when the
form loads.
I've also tried overriding DefWndProc to see what messages are causing
this, but I can't make heads or tails of the messages that are coming
through. Although, some of them said things about focus and
activating... so I tried calling Display on the enter and activate
events too, and even that didn't work!
I've googled it, but all I get as results are things about double
buffering, and SetStyle and UserPaint, which I've already tried.
I've even tried calling Validate after every single line of code in my
form.
What am I doing wrong? How do I get rid of this drawing-over of my
form? Or how can I draw my own stuff after this drawing-over occurs?
Thanks in advance.
- E
call every time the load, resize, and paint events are called. It works
fine on paint and resize, but on load it doesnt happen.
When the form loads, it draws what I want, but then after a few
milliseconds it disappears. It's being drawn over by something else.
What's drawing over it?
I've tried using SetStyle, and setting UserPaint and
AllPaintingInWmPaint, and that doesn't do anything. I've tried making
an override of OnPaint and commenting out "base.OnPaint(e)", but that
doesnt work. No matter what I do, my changes are drawn over when the
form loads.
I've also tried overriding DefWndProc to see what messages are causing
this, but I can't make heads or tails of the messages that are coming
through. Although, some of them said things about focus and
activating... so I tried calling Display on the enter and activate
events too, and even that didn't work!
I've googled it, but all I get as results are things about double
buffering, and SetStyle and UserPaint, which I've already tried.
I've even tried calling Validate after every single line of code in my
form.
What am I doing wrong? How do I get rid of this drawing-over of my
form? Or how can I draw my own stuff after this drawing-over occurs?
Thanks in advance.
- E