Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: (solved)invisible window border causes smaller top of window  (Read 1285 times)

0 Members and 1 Guest are viewing this topic.

Me-Myself-And-I

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
(solved)invisible window border causes smaller top of window
« 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
}
 
« Last Edit: February 04, 2024, 10:11:44 pm by Me-Myself-And-I »

Me-Myself-And-I

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: invisible window border causes smaller top of window
« Reply #1 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.

 

anything