Thread: Eliminating a window border

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    13

    Eliminating a window border

    Hi,

    I'm trying to create a window that will have absolutely no borders. I'm working with win32 and the closest result I got until now was to create a window using the following styles:

    WS_POPUP
    WS_EX_APPWINDOW
    WS_VISIBLE

    But this still leaves a little border around the window. For my purposes I am simply trying to create a window that will take the entire screen and in which I will use Direct3D to render some simple things. However, I am not allowed to make my D3D present parameters fullscreen so I have to use a window.

    So I create a window at the full resolution (for example 1280x1024) but I get borders. I tried creating a window that is slightly larger than the value of the screen resolution but as expected, that window does not appear at all.

    Is this at all doable in win32 or will have to resort to something like GDI (if that might even help) ?

    I made a quick search in the forums but could not find anything useful about removing borders.

    Thanks in advance

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252
    Try this;

    WS_POPUPWINDOW&~WS_THICKFRAME&~WS_BORDER

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    13
    It works perfectly. I had not thought of negating the border parameter because I assumed that it was not automatically specified with the WS_POPUP style.

    It seems to be fine and it looks like the entire window is available for rendering (it's important for me as I need to display something on the first few lines).

    Thanks again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM