netmaestro wrote:Ok but if that WS_THICKFRAME bit is set the window becomes sizable. It is equivalent to the WS_SIZEBOX flag.
Yes you are right, I didn't considered that, my bad.
But it is exactly like when you use the #PB_Window_MaximizeGadget flag with PB (to obtain the window behavior you liked).
In fact in your original code you can have the #PB_Window_MaximizeGadget removed and #PB_Window_SizeGadget set to have the window "fit the workarea nicely".
Code: Select all
OpenWindow(0,0,0,0,0,"", #PB_Window_ScreenCentered | #PB_Window_SystemMenu |#PB_Window_MinimizeGadget | #PB_Window_SizeGadget) ; | #PB_Window_MaximizeGadget)
Judging from the API test the pixels eroded away are the normal behavior if you don't have a sizable window.
So in end is probably #PB_Window_MaximizeGadget that has a bit set it shouldn't have and #PB_Window_MinimizeGadget is the right one, or you end up with a sizeable window even when you don't want it.
And when you want it you can specify #PB_Window_SizeGadget.
That's for the value of the PB constants. For the behavior itself (the eroded pixels) if it does happen under win7 but not under xp (I didn't try it, nor I did try to enable/disable themes) that's another problem and I don't know what to say. But the difference between API (where you can control the style using the right flags) and your PB example (#PB_Window_MaximizeGadget is messing up the sizeable bit) is due to some not too much coherent PB constant values IMHO. I would say it's a bug.
EDIT: just tried under XP. Your PB code works the way "you like", no pixels cut away. But there is still the problem with the PB constant. #PB_Window_MaximizeGadget makes the windows sizeable even if you didn't specified it that way (it doesn't happen with #PB_Window_MinimizeGadget).