0

Using Dialog Box:

I want to draw a ball in a solid color and be able to move the ball around on the Dialog Box.

Thanks

5
Contributors
6
Replies
9
Views
14 Years
Discussion Span
Last Post by Dante Shamest
0

There's different ways to do this. How do you want to do it? You can do it quickly with dialog wizards or code it from scratch. This sounds like a class assignment. You have to be more specific.

0

Using Dialog Box:
I want to draw a ball in a solid color and be able to move the ball around on the Dialog Box.

Simplest way I can think of would be to set up a timer and update the coordinates of the ball in it. Call InvalidateRect and UpdateWindow to force an update of the screen.

Override the OnPaint message handler for your dialog. Draw your ball in there using the device context pointer provided.

0

I think what it seems to me that he wants is to associate the moving object (the ball) with a keyboard or mouse control.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.