title: I have added an OnPaint() function to my dialog class but its not getting called after dlg.DoModal()
body: <p>Can anyone please help me understand how to override <code>OnPaint()</code> for a dialog class derived from <code>CDialog</code>.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>ColorImageDlg *pDlg = NULL;
  pDlg = new ColorImageDlg;
  pDlg-&gt;DoModal();
  delete pDlg;
  </code></pre>
  
  <p>I'm overriding <code>OnInitDialog()</code> and it's getting called.
  But while overriding <code>OnPaint()</code> it is not getting called.</p>
  
  <p>Can any one please help me fixing it?</p>