I used VC to render the Opengl picture,but every time I minimize the window, the picture would disappear.
I have filled the OnSize message,so changing the size has no problem.What other message have I missed to fill,how to fill?
Thanks.
You need to redraw on resize, look at nehe.gamedev.net code for windows.
Originally posted by Maximus:
I used VC to render the Opengl picture,but every time I minimize the window, the picture would disappear.
I have filled the OnSize message,so changing the size has no problem.What other message have I missed to fill,how to fill?
Thanks.
Thanks.But another problem occured.Every time I opened the menu list,and when the window is maximized, the picture would disappear after the menu overlapped the picture.What can I do.
As suggested, start with a simple example like NeHe’s or Display3DS .
Look at the small mainline called Display3DS.cpp which shows how to handle file dialogs and timer event handling easily.
You should structure your code in such a way that drawing is done in response to WM_PAINT messages.
X3J16
Originally posted by Maximus:
Thanks.But another problem occured.Every time I opened the menu list,and when the window is maximized, the picture would disappear after the menu overlapped the picture.What can I do.