Difference between Cclint DC & Cpaint Dc
Answers were Sorted based on User's Feedback
Answer / s.subashselvan
CClientDC will paint only the client area of the window and
it will work any message handler.
CPaintDC will paint only the client area of the window but
it only work on OnPaint message Handler only.
| Is This Answer Correct ? | 26 Yes | 2 No |
Answer / susinderan
Both draws only window's client Area
-----------------
CClienDC()
-----------------
(i) constructor calls GetDc()
(ii) Destructor calls Release()
(iii) Will not remove WM_PAINT msg
(iv) Should not be used inside onPaint().
can be used outside onPaint()
-----------------
CPaintDC()
-----------------
(i) constructor calls BeginPaint()
(ii) Destructor calls EndPaint()
(iii) Will remove WM_PAINT msg
(iv) Should be used only inside onPaint()
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / narendra
CPaintDC For drawing in a window's client area (OnPaint
handlers only)
CClientDC For drawing in a window's client area (anywhere
but OnPaint)
| Is This Answer Correct ? | 7 Yes | 3 No |
Answer / swati
Cpaintdc can be used for only onpaint handler while
cclientdc can be used to paint in client area bt can use any
handlers like ondraw,onpaint
cwindow can be used to paint in whole window
cmetafile is used to store seq of files as physical output.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / rahul susar
"CPaintDC" For drawing in a window's client area (OnPaint
handlers only)
"CClientDC" For drawing in a window's client area (anywhere
but OnPaint)
"CWindowDC" For drawing anywhere in a window, including the
nonclient area
"CMetaFileDC" For drawing to a GDI metafile
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / pnnr
CClientDC will paint only the client area of the window
CPaintDC will paint the whole window area including the
client area and non client area (Menu's , toolbar's etc..)
| Is This Answer Correct ? | 9 Yes | 17 No |
What is CArchive class dowes?
What interface must be supported by an ActiveX control?
What is socket?
how does the UIThread and worker thread communicates and handle events
What is the difference between ASSERT and VERIFY?
1)How to create ToolTip in MFC?
How many types of combo box are their
2 Answers Aaditya Info Solutions, E Logic,
Does the application have more than one object? If Yes, Briefly explain.
WHAT IS DIFFERENT BETWEN RELEASE MODE & DEBUGGING MODE
4 Answers Google, Microsoft, TCS,
Hi All, i am new for VC++ SDK. i want to get the IP Address of all the External device connected with my local machine.please give the code Regards, Praveer
Do you have an idea about MFC?
In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?
3 Answers Financial Technologies,