Re: Drawing Layers
To be honest, I really don't know what that means.
A standard MFC application provides an OnDraw() method in the view class.
Unless you are doing something very advanced, this is where all your drawing
should take place and nowhere else.
Further, this method accepts a CDC pointer as an argument. Just to clarify,
this is *not* a memory DC. It is a device DC, normally associated with the
screen, which is what you probably want.
So use pDC->Rectangle() in the OnDraw() method. If you are doing something
else, I have no idea what you are doing or why.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"jp2code" <poojo.com/mail> wrote in message
news:u8gqeoTzHHA.3916@TK2MSFTNGP02.phx.gbl...
Thanks Mr. Wood.
I am already working in the device's OnPaint event, so I have the memory
DC available.
I'll look into CDC::Rectangle().
FYI: I did take into account your earlier post.
To draw a Rectangle, use the ::Rectangle() function, or better, use the
CDC::Rectantle() method.
As I pointed out in my previous post to you, a memory DC will eliminate
flicker. If you are having problems with flicker, then use a memory DC.
But all you've described is something very simple and there really
shouldn't be any problematic flicker.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com