RE: [GD-Windows] Going fullscreen
Brought to you by:
vexxed72
From: Simon O'C. <si...@sc...> - 2004-02-01 17:04:53
|
If you use CreateWindowEx() instead of CreateWindow(), there is am extended style called WS_EX_TOPMOST which should get you more reliable results. You probably also want to add some extra code to handle cases where your window isn't the focus though so that things like Alt-Tab work don't crash your program or reduce the usability of the OS. This can be as simple as handling the WM_ACTIVATE message in your message procedure and keeping an "am_I_the_active_app" flag to decide whether to update your stuff. Returning HTCLIENT for WM_NCHITTEST messages when in fullscreen is a good idea too. That fools Windows into not detecting clicks on non-client areas of the window such as the menu at the top left. Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Eero Pajarre > Sent: 01 February 2004 15:35 > To: gam...@li... > Subject: [GD-Windows] Going fullscreen > > > I am setting up my program using the freeglut library, but I > have one problem. My program starts up in a fullscreen window > using the (free)glut gamemode. The problem is: sometimes the > Windows (XP) system/menu/status bar at the bottom of the > screen stays on top of my fullscreen window. In addition to > the visible problem, this causes problem for my sound system, > as apparently requires that my window must be the one "with focus". > (If there are other windows on screen, they will also be on > top of my gamemode window, when the problem happens) > > The freeglut library seems to enter gamemode, by first > setting the requested display parameters, and then creating > the new window using the following flags: > flags = WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN > | WS_VISIBLE; > > > I am currently using Nvidia display cards, and my desktop and > fullscreen window is 2048x768 pixels, spanning both of the > video outputs of the card. > > Any ideas on how to make freeglut behave more reliably? > Alternatively, is there a function which I could call to > force my window to be on top of the window stack? > > > > Eero > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 Premiere > Conference on Open Tools Development and Integration See the > breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004 |