It's about time that I post a message into Bogdans Forum :) I got a redrawing problem.. Whenever I minimize or Maximize or move my window halfway out of screen a WM_DRAWITEM message is sent to my window... It updates but unfortunately inserts the changes which should only be added in next turn :( Any recommendations? (please don't ask me to post code, you'd just start screaming... I'm wrote it almost in a row for +/- 6 to 7 hours.. and I can tell that it looks nasty) TIA, JimmyC
Posted on 2001-05-08 22:50:00 by JimmyClif
It looks like you have CS_VREDRAW and CS_HREDRAW flags in style parameter in main window class.
Posted on 2001-05-09 07:39:00 by Iwabee
Nope, wasn't that ;) I worked it out using a few flags... after all I want it to redraw from time to time.. Thanks anyway :) Jim
Posted on 2001-05-09 17:29:00 by JimmyClif
I ... again have to suggest using a modifyed message loop (using PeekMessageA) and a backbuffer (memoryDC) for GDI Games (and not only) ;D DONT base your game world state changes on Win system messages like WM_Paint, WM_Redraw and such... have internal explicit state changes ... either by the user intervention (like pushing a "Next Turn button") or on time/(read frames) like in RTS where time advances by itself ... but never on WM_Paint :D This message was edited by BogdanOntanu, on 5/9/2001 6:09:58 PM
Posted on 2001-05-09 17:54:00 by BogdanOntanu
Yup, I found that out ;P It works quite well as it is right now.. even tho, that I wish that I never have to re-read this source or even debug What I need would be a decent tut how to write an application/game.. as I keep adding stuff all over the place and create workarounds with Flags.. Actually my screen gets updated whenever Windows feels like doing it.. but IF there's a mouseclick - there's a chainreaction happening in form of a Flag with it's innocent name "UpdateFlag" One static window updates the next, the last one closes the door.. erm the Flag... But worst is my "Did the user do a good move?" - Handling... Honestly... once this part is bug free... I'll never look it up again.. I can't see nor if nor out anymore..
Posted on 2001-05-09 21:17:00 by JimmyClif