I'm trying to have the Enter key as my pause key for my Squibbles game. The problem i'm having is, at the main menu the enter key stays in the queue of messages and causes the game to start paused! I tried using PeekMessage to automatically clear up the queue before entering the main game loop but it still does the same thing. I ended switching the pause key from enter to the space bar which is ok I guess but I still would like to know why this happens and if there is any way to ... how can I say this ... how about properly do it? I'm not asking for a fix or a way around it, I just need to know why its behaving this way and I can probably find a way to code it another way but right now, I am clueless as to why its behaving this way, I'm assuming its staying in the key but if I run PeekMessage with PM_REMOVE I would expect the queue to be clean and this should not cause the game to pause, some how the proc is picking it up!
The core of the game is all in the Snake class but theres quite a number of files the game uses; createapp.h, gamedata.h, leveldata.h, texthdc.h, snake.h, snakefood.h, menusystem.h and finally squibbles.cpp...oh i forgot createapp.cpp, gamedata.cpp, leveldata.cpp, texthdc.cpp, snake.cpp, snakefood.cpp, menusystem.cpp ...... lol do you really want to see over two-thousand lines of code?