Homework #16
- Goal:
Learn how to use a linked list in MFC to store data.
- Please UPLOAD your homework (ZIP or RAR file) to TA at
http://ms11.voip.edu.tw/cs102/
- Deadline: 2008/6/9 10:00 AM
- Requirements:
- Write an MDI application which draws 10 circles.
- Use the rand()
function to generate the coordinates of the center of the
circles.
- Use the random number generator to generate the color to be
filled inside the circle, too.
- The radius of each circle is fixed (e.g. 10).
- Store the coordinates of those centers in a linked list. Sort
them according to the X coordinates in ascending order.
- Connect the leftmost center point to the second leftmost one.
Connect the second leftmost center point to the third leftmost one, and so on.
- Design the view so that,(Hint:You can consider "this->GetDC()" function)
- When users click the left button of the mouse, your program draws 10 circles.
- When users click the middle button of the mouse, it connects all circles.
- When users click the right button of the
mouse, your program cleans all images in the window, so that users can
click the left button and repeat the above procedure again.