Question: DirectX 9 Modify this chapters DirectX Window example program so a new random window color will be displayed each time the space bar is pressed.

DirectX 9

Modify this chapters "DirectX Window" example program so a new random window color will be displayed each time the space bar is pressed.

Hints: Add a backColor variable of type COLOR_ARGB to the Graphics Class. Modify the showBackBuffer functionin the Graphics class to use the backColor variable when clearing the screen. Add the following function to the graphics.h file:

//Set color used to clear sreen

void setBackColor(COLOR_ARGB c) {backColor = c;}

I have the COLOR_ARGB backColor variable and the setBackColor function.

That's where I'm stuck.

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 Databases Questions!