SFML community forums

Help => Graphics => Topic started by: Me-Myself-And-I on February 04, 2024, 08:40:27 pm

Title: (solved)invisible window border causes smaller top of window
Post by: Me-Myself-And-I on February 04, 2024, 08:40:27 pm
I have a program that gets the desktops workarea size then makes a window with that size and it works good for displaying the window as large as the screen and not cover up the taskbar but either this or sfml's window class is causing a transparent border to shrink the window at the top.

Here's my code:



IntRect getWorkArea()
{
        RECT rcWorkArea = { 0 };
        SystemParametersInfo( SPI_GETWORKAREA, 0, &rcWorkArea, 0 );
        return IntRect(int(rcWorkArea.left),int(rcWorkArea.top),int(rcWorkArea.right),int(rcWorkArea.bottom));
}


int main()
{
        IntRect workarea;
        workarea=getWorkArea();
        RenderWindow window(VideoMode(workarea.width,workarea.height),"Blupi Desktop",Style::None);
       
       //loop stuff
}
 
Title: Re: invisible window border causes smaller top of window
Post by: Me-Myself-And-I on February 04, 2024, 10:11:29 pm
Ok.Nevermind.I found a solution. It seems this happens because the window is set to create in the center of the screen.All that was needed was to move the window to point 0,0 after creating it.