When you create a PB Window specifying #PB_Window_MinimizeGadget there is a min button and the window is not resizable. It's ok since you didn't specify the #PB_Window_SizeGadget flag.
If you create the window again but specifying #PB_Window_MaximizeGadget there is a max button but the window is now resizable.
Why ?
I think there is a bug with the #PB_Window_MaximizeGadget value, since it has the #WS_SIZEBOX bit set.
Code: Select all
Debug RSet(Bin(#WS_SIZEBOX),32,"0") ; bit 18 is on
Debug RSet(Bin(#PB_Window_MaximizeGadget),32,"0") ; bit 18 is on, why ?
Debug RSet(Bin(#PB_Window_MinimizeGadget),32,"0") ; bit 18 is off, ok
Debug "minimize button, window not resizable"
OpenWindow(0,100,100,640,480,"", #PB_Window_MinimizeGadget)
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Debug "minimize button, window resizable as requested by specifying the #PB_Window_SizeGadget flag"
OpenWindow(0,100,100,640,480,"", #PB_Window_MinimizeGadget | #PB_Window_SizeGadget)
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Debug "maximize button, window is resizable, why ?"
OpenWindow(0,100,100,640,480,"", #PB_Window_MaximizeGadget)
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Debug "if I remove the #WS_SIZEBOX bit, the window is not resizeable anymore"
OpenWindow(0,100,100,640,480,"", #PB_Window_MaximizeGadget &~ #WS_SIZEBOX)
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Debug #PB_Window_MaximizeGadget ; current vale
Debug #PB_Window_MaximizeGadget & ~ #WS_SIZEBOX ; shouldn't have this value instead ?