which CDC

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello,
I am a bit confused as to which dc to call in the following situation. I
have a dialog app with a static control on it that I am using to paint a
graph on. I am doing the drawing in the lbuttondown function in the dialog
class. My qestion is how do I call the device context to paint on the
static control. Do I use the CClientDC dc(this); to get the device
context of the dialog and do the drawing using this dc, or do I call
CClinetDC dc(&m_myStaticControl); or dc = m_myStaticControl.GetDC(); to
get the dc of the control, and use it to do the drawing? Are all these dc
the same windows dc or is the dc of the static control different than the dc
of the dialogbox?
thanks
this question has puzzled me for a long time
bill


.


Quantcast