Very strange window sizes!

BlitzMax Forums/BlitzMax Programming/Very strange window sizes!

Grey Alien(Posted 2006) [#1]
Hmm, my desktop resolution is 1024x768 and if I run the code below the resulting window is not 2000,2000. Blitz Max has resized(cropped) it to fit my desktop res, fine. EXCEPT it doesn't properly fit my desktop!

I have Windows classic scheme so the title bars are the old Win98/2000 size not the chunky XP style. Sure the window appears in the top left, but the client area (inside the window frame) is 1030 pixels wide (too wide) and only 755 pixels tall (too short). What's going on? 13 pixels too short is odd as it's not the height of the title bar which is around 24 pixels iirc.

If I set width and height to 1024 and 768. The client area becomes 1024 wide (correct) but still only 755 pixels tall (too short). Of course if I set the window to 800x600, it's fine because it fits on my screen. I haven't tried dropping my res to 800x600 and then checking what the window size is yet, because this will screw up all my icons (Perhaps I should create a new test user).

Const GFX_WIDTH = 2000, GFX_HEIGHT = 2000, BIT_DEPTH = 0, HERTZ = -1

Graphics GFX_WIDTH, GFX_HEIGHT, BIT_DEPTH, HERTZ
Repeat
	SetColor 255,200,0
	DrawText "test",0,0
	DrawLine 100,0,210,0
	DrawLine 100,754,210,754
	DrawLine 0,100,0,210
	DrawLine 1029,100,1029,210
	
Flip

Until KeyDown(KEY_ESCAPE) Or (AppTerminate()=True)


[edit] just testing in 800x600 and exactly the same results. If width and height are set to 800x600, the client area width is correct but 13 pixels too short. If width and height are set to a 2000x2000, the width is 6 pixels wider and still 13 pixels too short.


FlameDuck(Posted 2006) [#2]
Check whether your start bar is set to "Keep on top of other windows".


Grey Alien(Posted 2006) [#3]
so it is. Although, I turned it to auto-hide to do these tests otherwise I couldn't see the bottom of the window. Thing is most end-users will have it set "Keep on top" too as it's the default setting isn't it?

[edit] just tested with Keep on top turned off. Same result. The task bar does not affect the window sizing.