Getting Size & Location of ChildView :: MFC
I am using AppWizard single-document type setup. I need to get the rectange of the ChildView. All I am trying to do is change the background color of the ChildView. So ineed to get the exact size and location of the ChildView related to the MainFrame. I tried using this:
CWnd *pWnd = AfxGetMainWnd();
CBrush *pOldBrush, newBrush(RGB(0, 0, 0));
CDC *pDC = pWnd->GetDC();
pOldBrush = pDC->SelectObject(&newBrush);
The problem with the code segment above is that it repaint everything inside the MainFrame including the toolbar and statusbar. I would like it to paint the ChildView.