Click here to Skip to main content
15,887,477 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to end a thread Pin
Chen-XuNuo14-Dec-07 18:03
Chen-XuNuo14-Dec-07 18:03 
GeneralRe: How to end a thread Pin
Mark Salsbery15-Dec-07 7:45
Mark Salsbery15-Dec-07 7:45 
GeneralRe: How to end a thread Pin
Chen-XuNuo14-Dec-07 18:15
Chen-XuNuo14-Dec-07 18:15 
GeneralRe: How to end a thread Pin
Mark Salsbery15-Dec-07 7:33
Mark Salsbery15-Dec-07 7:33 
GeneralRe: How to end a thread Pin
Chen-XuNuo15-Dec-07 3:14
Chen-XuNuo15-Dec-07 3:14 
GeneralRe: How to end a thread Pin
Mark Salsbery15-Dec-07 7:31
Mark Salsbery15-Dec-07 7:31 
GeneralRe: How to end a thread Pin
Chen-XuNuo15-Dec-07 14:52
Chen-XuNuo15-Dec-07 14:52 
AnswerRe: How to end a thread Pin
Cedric Moonen13-Dec-07 20:26
Cedric Moonen13-Dec-07 20:26 
If you want my advice, I don't think that you need to create a thread for that. If you keep that logic, it would mean that you will create a thread for every bullet in your game. And probably for every ennemy too. Honnestly, I don't think this is a good idea.

You should better process the position of all your 'entities' (bullets, ennemies, ...) in the message pump and then draw everything on the screen. You don't need a thread for that.
I don't know if you are using the MFC's or not, but if that's the case, then you won't have access to the message pump. But you could override the OnIdle function from your App class and do it there.

Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: How to end a thread Pin
Mark Salsbery13-Dec-07 20:38
Mark Salsbery13-Dec-07 20:38 
GeneralRe: How to end a thread Pin
Chen-XuNuo14-Dec-07 4:40
Chen-XuNuo14-Dec-07 4:40 
GeneralC2365 error Pin
subramanyeswari13-Dec-07 18:54
subramanyeswari13-Dec-07 18:54 
GeneralRe: C2365 error Pin
Mark Salsbery13-Dec-07 19:13
Mark Salsbery13-Dec-07 19:13 
GeneralRe: C2365 error Pin
subramanyeswari13-Dec-07 19:59
subramanyeswari13-Dec-07 19:59 
QuestionA non-const reference may only be bound to an lvalue? Pin
George_George13-Dec-07 18:50
George_George13-Dec-07 18:50 
AnswerRe: A non-const reference may only be bound to an lvalue? Pin
Iain Clarke, Warrior Programmer14-Dec-07 1:21
Iain Clarke, Warrior Programmer14-Dec-07 1:21 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
toxcct14-Dec-07 2:38
toxcct14-Dec-07 2:38 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
Iain Clarke, Warrior Programmer14-Dec-07 3:29
Iain Clarke, Warrior Programmer14-Dec-07 3:29 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
toxcct14-Dec-07 3:30
toxcct14-Dec-07 3:30 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
Nelek16-Dec-07 21:11
protectorNelek16-Dec-07 21:11 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
George_George14-Dec-07 17:56
George_George14-Dec-07 17:56 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
Iain Clarke, Warrior Programmer14-Dec-07 22:28
Iain Clarke, Warrior Programmer14-Dec-07 22:28 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
George_George16-Dec-07 2:24
George_George16-Dec-07 2:24 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
Iain Clarke, Warrior Programmer16-Dec-07 8:02
Iain Clarke, Warrior Programmer16-Dec-07 8:02 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
George_George16-Dec-07 20:50
George_George16-Dec-07 20:50 
GeneralRe: A non-const reference may only be bound to an lvalue? Pin
Iain Clarke, Warrior Programmer16-Dec-07 22:13
Iain Clarke, Warrior Programmer16-Dec-07 22:13 

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.