I've learned at school that i should avoid Global declarations... But now with windows API i noticed all variables to be used or updated in WM_PAINT after every WM_COMMAND need to be global, otherwise won't update... Is there a limit here? and is my perception correct