|
void CCalendarView :: OnUpdate (CView * pSender, LPARAM lHint, CObject * pHint)
{
CDC * pDC = GetDC ();
CDrawUI * pDraw = new CDrawUI;
RECT rect;
rect.left = START_X;
rect.top = START_Y;
rect.bottom = START_X + 100;
rect.right = START_Y + 50;
pDraw-> DrawRect (rect, pDC); // Error positioning here
}
error C2664: 'DrawRect': cannot convert parameter 2 from 'class CDC *' to 'class CDC'
void CDrawUI :: DrawRect (RECT rect, CDC * pDC)
{
CBrush pTitleBrush (TITLE_BKCLR);
CBrush * pOldBrush = pDC-> SelectObject (&pTitleBrush);
pDC-> Rectangle (&rect);
pDC-> SelectObject (pOldBrush);
ReleaseDC (pDC);
} |
|