RE: [GD-Windows] Messed up windows after fullscreen
Brought to you by:
vexxed72
From: Philip T. <pt...@mi...> - 2001-10-02 20:43:32
|
WM_CREATE is a post-notification of window creation. at that point, you = should be able to use the window handle with other Win32 API calls. I suspect that is why OGL is initialized during WM_CREATE. note if for some reason you want to fail the creation of your own = window, you need to handle WM_NCCREATE, which is the pre-notification of = window creation. by returning either FALSE or -1 ( cant remember off the = top of my head, its been a while since I wrote custom controls where = this can be important ) then you will get an invalid window handle back = from CreateWindow. any good introductory Win32 tome should discuss, somewhat, the = initialization sequence of messages duing window creation. serious = spelunkers should be familiar with Matt Pietreks' work. > -----Original Message----- > From: Aaron Hilton [mailto:Vid...@ho...] > Sent: Friday, September 28, 2001 6:42 PM > To: gam...@li... > Subject: Re: [GD-Windows] Messed up windows after fullscreen >=20 >=20 > Yep, setting a break point confirms that WM_CREATE is generated and > called within CreateWindow(). Wish I had a reasonable answer to why > OpenGL is initialized in WM_CREATE. However, that skeleton I=20 > sent seems > to always work fine. >=20 > Looking around, there seems to be a progression of messages=20 > delivered by > the OS when CreateWindow is called, and WM_CREATE is somewhere in the > middle. Wish I could just walk through the OS code base and=20 > see what it > really does! >=20 > Good luck. > - Aaron. >=20 > Brian Hook wrote: > > Yep, I'm doing that. Actually, I'm now doing: > >=20 > > CreateWindow(); > > ShowWindow(); > > UpdateWindow(); //this shouldn't be necessary if you don't handle > > WM_PAINT > > SetForegroundWindow(); > > SetActiveWindow(); > > SetFocus(); >=20 > > I'm doing that after CreateWindow() and not in WM_CREATE. =20 > Is there a > > particular reason that you do it in WM_CREATE? AFAIK (but=20 > this is an > > assumption), CreateWindow() dispatches WM_CREATE synchronously. >=20 > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >=20 |