•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,556 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,446 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 980 | Replies: 0 | Solved
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Am a new c++ programmer.
I refer to the code " Bouncing Ball" which is a GUI, now there is a rectangle created, i managed to change the color the rectangle in the main window and what my may problem is how to make the rectangle fixed and not only increase to be a full rectangle after the ball has hit both ends, how do i achieve that?
Secondly, i would love to then after making a 'fixed' rectangle, i would like to make the ball change color as it hits one side of the rectangle and change back to the original color as its starts coming back and approaches the other side and again change color as it hits the other side and change back again as it approaches the other side and keep repeating this cycle...
Basically I need the rectangle to be fully drawn or fixed EVEN before the ball starts moving and then the change of colors issue.
I have attached the code and the changes i made!
<snipped email>
I refer to the code " Bouncing Ball" which is a GUI, now there is a rectangle created, i managed to change the color the rectangle in the main window and what my may problem is how to make the rectangle fixed and not only increase to be a full rectangle after the ball has hit both ends, how do i achieve that?
Secondly, i would love to then after making a 'fixed' rectangle, i would like to make the ball change color as it hits one side of the rectangle and change back to the original color as its starts coming back and approaches the other side and again change color as it hits the other side and change back again as it approaches the other side and keep repeating this cycle...
Basically I need the rectangle to be fully drawn or fixed EVEN before the ball starts moving and then the change of colors issue.
I have attached the code and the changes i made!
<snipped email>
Last edited by Ancient Dragon : Oct 20th, 2007 at 8:00 pm. Reason: snipped email
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- "No Mixer Device Available" Tried Everything I Can Find (Windows NT / 2000 / XP / 2003)
- Installing Windows 98 On VMware. Floppy problem (Windows 9x / Me)
- Selectively Printing only Certain Divs (javascript/css question) (JavaScript / DHTML / AJAX)
- "Save Target As.." isn't working in IE6 (Web Browsers)
- bouncing ball? (C#)
- Making a ball move down and up in an Applet (Java)
- Homework Help: How can I get this ball to Move? (Java)
- "Dirty/sticky" optical mouse (Windows NT / 2000 / XP / 2003)
Other Threads in the C++ Forum
- Previous Thread: Transparency Problems
- Next Thread: reading file I/O


Linear Mode