It depends on your OS ... assuming your window is a window in Windows :D ... here is a link to the basic code for a window in C and an explanation of what/why you need all of this.
http://www.winprog.org/tutorial/simple_window.html
Hope it helps!