RE: [GD-Windows] Messed up windows after fullscreen
Brought to you by:
vexxed72
From: Brian H. <pu...@py...> - 2001-09-28 23:39:04
|
> // THIS MAY BE IMPORTANT! Make the app window visible... > ShowWindow( hWnd, SW_SHOW ); > UpdateWindow( hWnd ); Yep, I'm doing that. Actually, I'm now doing: CreateWindow(); ShowWindow(); UpdateWindow(); //this shouldn't be necessary if you don't handle WM_PAINT SetForegroundWindow(); SetActiveWindow(); SetFocus(); Thorough enough? =) > case WM_CREATE: > // Remember our mSloth drawing context. > hDC = GetDC( hWnd ); > > if( oglFullscreen ) > { > ChangeDisplayMode(); > } > > // Select our precious pixel format. > SetDCPixelFormat( hDC ); > > // Yeppers, make something that OpenGL understands. > hRC = wglCreateContext( hDC ); > wglMakeCurrent( hDC, hRC ); > > ReleaseDC( hWnd, hDC ); > break; I'm doing that after CreateWindow() and not in WM_CREATE. Is there a particular reason that you do it in WM_CREATE? AFAIK (but this is an assumption), CreateWindow() dispatches WM_CREATE synchronously. Brian |