Click here to Skip to main content
15,879,095 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionregister window message Pin
so0_lanhlung219-Jun-11 16:56
so0_lanhlung219-Jun-11 16:56 
AnswerRe: register window message Pin
xrg_soft@163.com19-Jun-11 17:44
xrg_soft@163.com19-Jun-11 17:44 
GeneralRe: register window message Pin
softwaremonkey19-Jun-11 19:41
softwaremonkey19-Jun-11 19:41 
QuestionMoving Objects in small increments Pin
Cyclone_S19-Jun-11 14:07
Cyclone_S19-Jun-11 14:07 
QuestionRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 15:03
enhzflep19-Jun-11 15:03 
AnswerRe: Moving Objects in small increments Pin
Cyclone_S19-Jun-11 16:03
Cyclone_S19-Jun-11 16:03 
GeneralRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 16:23
enhzflep19-Jun-11 16:23 
GeneralRe: Moving Objects in small increments Pin
Cyclone_S19-Jun-11 16:49
Cyclone_S19-Jun-11 16:49 
I'm not sure I understand. Do you understand what I'm trying to do? after the ball hits the paddle it should move left/right depending on how far from the center it is. Just need finer precision on the angle(xvel) of the ball. Thanks.


I tried something like this. I took a number like 1.65 and did
1.65 - Math::Floor(1.65)
to get just the decimal part of the number 0.65.Then every frame I added 0.65 to 0.65 and checked if it was >= 1. If it was I added 1.0 to the left/right property of the box. I then repeated that.

The problem with it was I wasn't encounting for the speed of the ball. If the speed of the ball is 6 it moves 6 frames every timer tick. The code I was trying only moved 1 pixel at a time.

I'm just not sure on the math to incorporate the speed into it.
GeneralRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 18:24
enhzflep19-Jun-11 18:24 
GeneralRe: Moving Objects in small increments Pin
enhzflep19-Jun-11 21:35
enhzflep19-Jun-11 21:35 
GeneralRe: Moving Objects in small increments Pin
Cyclone_S20-Jun-11 14:33
Cyclone_S20-Jun-11 14:33 
GeneralRe: Moving Objects in small increments Pin
enhzflep20-Jun-11 18:45
enhzflep20-Jun-11 18:45 
QuestionWSA Events Pin
csrss19-Jun-11 3:32
csrss19-Jun-11 3:32 
AnswerRe: WSA Events Pin
enhzflep19-Jun-11 4:13
enhzflep19-Jun-11 4:13 
GeneralRe: WSA Events Pin
csrss19-Jun-11 5:43
csrss19-Jun-11 5:43 
QuestionRe: WSA Events Pin
Mark Salsbery19-Jun-11 9:38
Mark Salsbery19-Jun-11 9:38 
GeneralRe: WSA Events Pin
csrss19-Jun-11 13:13
csrss19-Jun-11 13:13 
GeneralRe: WSA Events Pin
Mark Salsbery19-Jun-11 14:10
Mark Salsbery19-Jun-11 14:10 
GeneralRe: WSA Events Pin
csrss20-Jun-11 5:46
csrss20-Jun-11 5:46 
GeneralRe: WSA Events Pin
Mark Salsbery20-Jun-11 9:29
Mark Salsbery20-Jun-11 9:29 
GeneralRe: WSA Events Pin
csrss20-Jun-11 10:17
csrss20-Jun-11 10:17 
QuestionHow can I read all files from 'Recent File List' ? Pin
_Flaviu18-Jun-11 8:56
_Flaviu18-Jun-11 8:56 
AnswerRe: How can I read all files from 'Recent File List' ? Pin
Richard MacCutchan18-Jun-11 21:42
mveRichard MacCutchan18-Jun-11 21:42 
GeneralRe: How can I read all files from 'Recent File List' ? [modified] Pin
_Flaviu18-Jun-11 21:45
_Flaviu18-Jun-11 21:45 
GeneralRe: How can I read all files from 'Recent File List' ? Pin
Richard MacCutchan19-Jun-11 21:45
mveRichard MacCutchan19-Jun-11 21:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.