What I mean with "Which is kinda not want I want in a menu" is how my menu should work. I don't want a user being able to hold down the down key and then the menu "selector" rapidly loops through the whole many in the same speed as a while() loop goes.
I want to prevent so that the user have to "press down->release->press down again" in order to move down in the menu.
Quote:You get a WM_KEYDOWN message in your window proc when a key is initially pressed, and a WM_KEYUP when it's released.
Okey I get a WM_KEYDOWN message in my window proc. But my menu class doesn't have any connections what so ever with the window proc function.. I can ofcourse reconstruct it up so it has, but it feels more natural to add a function to the Menu class that keeps track of if any keys have been pressed.
For example I don't want to move the "menu selector" if I'm playing a map, that means that my window proc function have to get that information and when i think about it really thinks like messing stuff up ..
It must be hard for you to understand since you don't know how I've built all my classes but I simply want is a Menu::onPress(char key) function that returns true if the 'key' have been pressed.