Question: Modify the TwoDPoints project in the folder Chup8V-TwoDPoints so that the Show2DPoint member function of the class C2DPoints can display points with a specified color.

Modify the TwoDPoints project in the folder Chup8V-TwoDPoints so that the Show2DPoint member function of the class C2DPoints can display points with a specified color. Add an argument to the Show2DPoint function (shown in Table 8.1) using the variable type COLORREF and then adjust the code so that points can be displayed in the color specified by the COLORREF variable. Modify the OnDraw function using your new Show2DPoint function appropriately to make the following displays: (a) all of the points in blue, (b) half of the points in blue, half of the points in red and (c) all of the points in random colors by using the rand() function and the RGB function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!