I'm just getting into Windows programming and have a question about using WM_PAINT. You're supposed to do all your drawing in there right? But aren't you also supposed to declare your variables in WinMain? So if I've declared an object in WinMain, how do I send it to WndProc so WM_PAINT can draw it? There must be a more elegant solution than global variables...

Thanks!