# no window-border with windows.h

## Recommended Posts

philipptr    260
I just started coding with windows.h and it seems like i cant find out how to remove the windowframe/border. (searched on msdn for a while but couldnt find it) and does someone know a tutorial on drawing images with a double buffer in windows.h-windows? EDIT: i want to make a program lunching application, and already went to SDL (cause i kno how to remove the border there), but realised that SDL wouldnt be right because of cpu use and such things (my programm should stay in systemtray until you click it and then a skinable menu should pop up :) )

##### Share on other sites
Endurion    5408
You have a call to CreateWindow or CreateWindowEx somewhere i reckon.

From the WS_something-styles remove WS_BORDER, WS_THICKFRAME and WS_DLGFRAME. This leaves you without any border. No border also implies no caption though!

For example:

CreateWindow( "MyClass",               "Hurz",               ( WS_POPUP | WS_VISIBLE ) & ~( WS_BORDER | WS_THICKFRAME | WS_DLGFRAME ),              ... );

##### Share on other sites
philipptr    260
Quote:
 Original post by Endurion...CreateWindow( "MyClass", "Hurz", ( WS_POPUP | WS_VISIBLE ) & ~( WS_BORDER | WS_THICKFRAME | WS_DLGFRAME ), ... );

thanks very much. i didnt knew howto remove specific flags. after studying them a bit, isnt what you do the same thing as just WS_POPUP?

btw: your rating: "User Rating: 1337" :D

##### Share on other sites
nife    235
Yes, the WS_POPUP will remove the border itself, and the window also needs the WS_VISIBLE to be visible from the beginning.