# How do i create a window (win32) with background initially set black?

**URL:** https://discourse.glfw.org/t/how-do-i-create-a-window-win32-with-background-initially-set-black/520
**Category:** support
**Created:** [January 9, 2013, 1:09am UTC](https://discourse.glfw.org/t/how-do-i-create-a-window-win32-with-background-initially-set-black/520 "2013-01-09T01:09:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [January 9, 2013, 1:09am UTC](https://discourse.glfw.org/t/how-do-i-create-a-window-win32-with-background-initially-set-black/520/1 "2013-01-09T01:09:45Z")

</div>

**[erf9](https://sourceforge.net/u/erf9/)** wrote on [Wednesday, January 09, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/e51cc943/#09e1):

I would like to create a window (win32) with the background set initially to black. Now it is white until glfwSwapBuffers is called, which causes an annoying flash. Please help=)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [January 9, 2013, 1:26am UTC](https://discourse.glfw.org/t/how-do-i-create-a-window-win32-with-background-initially-set-black/520/2 "2013-01-09T01:26:05Z")

</div>

**[erf9](https://sourceforge.net/u/erf9/)** wrote on [Wednesday, January 09, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/e51cc943/#fcfa):

Solved it by setting:  
wc.hbrBackground = CreateSolidBrush( RGB(0,0,0) );  
in  
win32\_window.c -\> registerWindowClass

Would be neat if this could be set through glfwOpenWindowHint.
