draw

, write down the statements that declare a pointer variable with identifier to a TShape with identifier “MyShape” and use it to create a TShape object at runtime. (3 marks)

ii. In order not to let the user create circles outside the drawing area, you have to implement (write a suitable code) the following:
3





[url=http://www.gulfup.com/?mK0bGh][img]http://im36.gulfup.com/wEcx7.png[/img][/url]

void __fastcall TForm1::Shape1ContextPopup(TObject *Sender,
TPoint &MousePos, bool &Handled)
{
: MyShape->Shape=stCircle;

}

- Add code to the OnChange event of (InputEdit) to check the value entered by the user and if it was > 20 then it should be automatically changed to 20.
- Add code to the OnChange events of (DiameterEdit) to check the value entered by the user and if it was > 25 then it should be automatically changed to 25.
Last edited on
Topic archived. No new replies allowed.