win32 alert for maximize

Started by
4 comments, last by Orb 19 years, 8 months ago
I am writing a tool based application using opengl for rendering. In my windows proc for the main window I would like to detect all messages for repainting, and I can't seem to find the message that indicates that a window has been maximized. I have used the WM_PAINT and WM_ACTIVATE which ones am I missing?
Advertisement
WM_SIZE?
adding wm_size makes it flicker before clearing to nothing... there must be some other message that is clearing it...
You're gonna want to make sure that you have a resize function after calling WM_SIZE... like this for example:

case WM_SIZE:		{			ResizeMainWindow();			RenderMainWindow();			break;		}
well I was calling my render function and then calling DefWindowProc(...) to make sure all the drawing of windows is still taken care of
You have to make sure you set the new viewport, because the viewport gets bigger when you fullscreen.

glViewport(0, 0, width, height);					// Reset The Current ViewportglMatrixMode(GL_PROJECTION);						// Select The Projection MatrixglLoadIdentity();							// Reset The Projection Matrix// Calculate The Aspect Ratio Of The Window	gluPerspective(70.0f,(GLfloat)width/(GLfloat)height,10.0f,4000.0f);glMatrixMode(GL_MODELVIEW);						// Select The Modelview MatrixglLoadIdentity();		

This topic is closed to new replies.

Advertisement