In windows I often use the twapi package to set window parameters. I
tried your settings for the flags in a call to twapi::SetWindowPos and
nothing seemed to happen to the window I was trying it on.
Then I saw that you have set it to ignore the position and size
parameters. So, I changed that to allow it to move and resize, and it
would then do that.
My suggestion is that you try it without the SWP_NOSIZE and/or
SWP_NOMOVE just to see if it will then use your 0,0,400,600 parameters.
That would tell you if you are even getting the call to SetWindowPos to
work on your window at all.
At first I thought the flags were there to change the window, but then I
realized they are used to suppress some of the other required arguments
to the call. That was a surprise to me, how about you?
In twapi, one can set windows styles and that seems to have many
effects, including ones that remove the ability to move the window, and
even remove the icon from the task bar.
Internally twapi uses Get/SetWindowLongPtr to get/set styles. Perhaps
those windows calls might be something you could look into.