OpenGL with MFC problem

Started by
0 comments, last by Shannon Barber 19 years, 5 months ago
Hello everyone, I have a question about using OpenGL with MFC. I have written John Conway's Life using OpenGL for the graphics and MFC for the window and buttons. I have everything working just fine except for one thing. When the window first opens you can't see the four buttons that I created. The part of the window where the buttons should be looks transparent, like you see right through the entire window onto the desktop. When you move the window you can see all four buttons and when you press a button you can see that button, but when you resize the window the buttons look transparent again. I have overridden OnSize but not OnMove or whatever the movement message handler is so I am sure that it is something that I did or didn't do. I would post source code here but there is a lot of it and I'm not sure where the problem is and I don't want to post the entire program. I was hoping that someone here would have encountered the same problem before and could at least advise me on what to try.

The code is here.

The game is here if anyone needs to see what I'm talking about.

Thanks for any help in advance.

Advertisement
Try putting an InvalidateRect() (I think that's what it's called, a Win32 API call, should be a member of CWnd) in the code that initializes the window.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement