# A Win32 question

**URL:** <https://discourse.libsdl.org/t/a-win32-question/2705>\
**Category:** SDL Development\
**Created:** [June 26, 2000, 2:39am UTC](https://discourse.libsdl.org/t/a-win32-question/2705 "2000-06-26T02:39:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Radcliffe](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/b/9fc29f/32.png) [@Bill\_Radcliffe](https://discourse.libsdl.org/u/Bill_Radcliffe)\
**Post date:** [June 26, 2000, 2:39am UTC](https://discourse.libsdl.org/t/a-win32-question/2705/1 "2000-06-26T02:39:29Z")

</div>

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](http://www.corbis.com)”

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [July 16, 2000, 7:50pm UTC](https://discourse.libsdl.org/t/a-win32-question/2705/2 "2000-07-16T19:50:56Z")

</div>

> 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
