The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: JFG on October 03, 2005, 08:14:17 PM

Title: changing the video mode
Post by: JFG on October 03, 2005, 08:14:17 PM
Does anybody know of a way to use GDI+ to change the video mode when the whole screen is being used for graphics?  Or is there some way to do that that actually does not require GDI+ (or say DirectX)?
Title: Re: changing the video mode
Post by: dioxin on October 03, 2005, 09:02:32 PM
JFG,
  it doesn't appear to need GDI+, just the normal api call ChangeDisplaySettings.

Get details from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_7gz7.asp

  See an example of its use in BASIC here:
http://www.powerbasic.com/support/forums/Forum7/HTML/002249.html

Paul.
Title: Re: changing the video mode
Post by: JFG on October 03, 2005, 09:31:58 PM
Okay.  Thanks for the response.  It turns out I actually managed to find that same answer a while after posting this question, checking again on the MSDN documentation.  I've spent I have no idea how long over the last two or three years, combing through that stuff, trying to find the answer to this same question, and I found it just now, on my own.  Why now?  I have no clue.  I'm really pissed off about it now.  But at least I have it.  Anyway, I find we can even do full-screen using this user32.dll ChangeDisplaySettings function, and then splatter whatever image we want over the whole screen, including the annoying task bar, using regular GDI functions.  We can even get all the supported display modes using the related EnumDisplaySettings function, along with the current display settings.  Why the heck do we need DirectDraw then?!  It's like it's only needed for Direct3D then, which itself is redundant on account of the existence of OpenGL, just like the bulk of all dozen or so functions that Windows has all for reading or writing data out of disk files.  (Suppose perhaps its an excuse for building and constantly expanding two Microsoft campuses in Redmond, each the size of a not-quite-so-small town.)  Well, I just thought I'd mention it 'cause I'm sure I'm not the only person who cares for taking over the whole screen and changing the video mode.
Title: Re: changing the video mode
Post by: Farabi on October 04, 2005, 09:51:27 AM
Check hitchikr OpenGL example. In there exist a function which will set it up.
Title: Re: changing the video mode
Post by: Gustav on October 05, 2005, 07:36:33 AM

> Why the heck do we need DirectDraw then?

DirectX has one big advantage: it allows you to lock the screen and then access the video memory directly (in fullscreen mode). With GDI, you are somewhat stuck to BitBlt, PatBlt and companions.
Title: Re: changing the video mode
Post by: JFG on October 17, 2005, 03:50:02 AM
Oh, well!  So that's how they legitimize the whole of their DirectX API!  It's just that DirectPlay thing for easier use of networks, locking the video buffer, and support for new digital input devices.  They didn't have to make a whole multimedia and games API for that.  And they didn't have to complicate it all by making it all out of COM objects.  Like I said, it's all just some big shoddy excuse for extravagant spending of money by Microsoft.  I've been at the Microsoft campuses!  (My father works at Microsoft.)  The place is two dementedly overgrown utopian minitowns; they show Microsoft is like a huge pig in the biz purely for the purpose of hogging the most money possible.  Money is all they care about!!