Okay, I tried it myself and I was able to do it using this method.
I created a 400x300 image in Paint.NET (Microsoft Paint will probably do as well) and brought the SMBX window upon it as shown in the screencap above. Then I resized it so the vertical edges match with those of the Paint.NET image. I zoomed into the screen using the Magnifier Glass tool to make this easier. A 500% zoom should make it fairly easy.
All right, at this point it was 300 pixels in height. Getting the horizontal edge dragged correctly was a bit trickier. I placed the level window so it touches the left side of the SMBX window and then I just counted the specific point where the level view would reach 400 pixels starting from the left side of the program window. It's between the Backgrounds and NPCs tab buttons.
The red area in the above image marks the distance between the 400 mark and the NPCs tab button. It's 2 pixels. Match the right of the level window with the left edge of the NPCs tab button and then drag it two pixels to the left and you're done!
Now to answer Deoxys's question, when there would appear no 1x1 pixels in the view, it will look fine like in the images I posted above but when they go 1 pixel off of the 2x2 pixel grid, stuff will begin looking like this:
So when you play, everything will switch rapidly between the good-looking view and the weird distorted view as shown in the above screen. But it is a fascinating idea to play SMBX in a 400x300 window. You can use the Magnifier Glass to zoom by 200% so the window will be 300x400 but zoomed so the pixels will all be 2x2, like if you were playing a SNES emulator!