?
Solved

override OnPaint() in CDialog

Posted on 2007-07-26
1
Medium Priority
?
2,637 Views
Last Modified: 2013-11-20
Hi,

what's the correct override of CDialog::OnPaint()? Is it this:

void CMyDialog::OnPaint()
{
    CDialog::OnPaint();
    CPaintDC dc(this);

     // now I can use dc to draw. But is the CDialog::OnPaint() call necessary?
}

Thanks
0
Comment
Question by:DJ_AM_Juicebox
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 19576284
>>But is the CDialog::OnPaint() call necessary?

No, not really, since the implementation simply is

_AFXWIN_INLINE void CWnd::OnPaint()
    { Default(); }

'CDialog' inherits that 'empty' member from 'CWnd'. However, it does not hurt either.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question