A Win32 question

This is a Windows only question…

Could someone explain how to use the SDL library when you need to create a
special type of window. I would like to create a window with no caption or
border and also force it to DIB mode instead of DirectX.

It looks like the basic plan is to nab a copy of SDL_main.c and hack it up.
However, it just calls SDL_RegisterApp which does the actual window class
creation. The creation of the actual window is buried even deeper and there
seems to be another call to SDL_RegisterApp at this time.

What’s up?

Also - what do you do if you want to get rid of the console entirely and
make a true Windows app. I would assume that most people do this when they
release a game and that the console is really just a debug assist. True?

William T. Radcliffe
Director of Technology Development
Corbis
15395 SE 30th Place - Suite 300
Bellevue, WA 98007
@Bill_Radcliffe (425) 649-3381 fax: 643-9742
web site is at “http://www.corbis.com

This is a Windows only question…

I see nobody answered it, so I’ll take a stab at it.

Could someone explain how to use the SDL library when you need to create a
special type of window. I would like to create a window with no caption or
border and also force it to DIB mode instead of DirectX.

To force DIB mode, initialize the DIB driver directly with:
SDL_VideoInit(“windib”, 0);
Use that call instead of:
SDL_Init(SDL_INIT_VIDEO);

Remember if you initialize SDL audio as well that you need to init the video
before you initialize the audio.

Now, to remove the title bar on the window, you’ll probably have to modify
the code which sets the window style in SDL_dibvideo.c Either that, or you
can use the extensions in SDL_syswm.h to remove the style after the window
is first created, although it will initially pop up with a caption and border.

Also - what do you do if you want to get rid of the console entirely and
make a true Windows app. I would assume that most people do this when they
release a game and that the console is really just a debug assist. True?

You shouldn’t be getting the console window. When you created the project,
did you create a new “Win32 Application” or “Win32 Console Application”?

Good luck!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software