Hi,
I want to draw line and rectangle in my application. I am getting error undefined identifier 'gc'. I know undefined identifier means it is not defined.but it is defined in view class.
My code is here for drawing line and rectangle..
case EGUICmdLine:
{ // to draw Line
TPoint startPoint(50,50);
TPoint endPoint(590,190);
gc.DrawLine(startPoint,endPoint);
break;
}
case EGUICmdRect:
{
// To draw rectangle
gc.SetBrushColor( TRgb(255,0,0));
gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
TRect drawRect(15,15,50,50);
gc.DrawRect(drawRect);
}
In my view class I have this line. CWindowGc& gc = SystemGc();
Please tell me which mistake I am doing. I need help so please any one answer me or correct my code so I can use.
I am waiting for valuable response.






