Page 1 of 1

[Implemented] SetMinMaxWindow()

Posted: Sat May 01, 2004 5:07 pm
by Flype
Hello Fred,

One command which could be useful :
SetMinMaxWindow(#Window,MinWidth.l,MinHeight.l,MaxWidth.l,MaxHeight)


This could be realized in the same way i think than the StatusBar auto resizing implemented in PB3.90
You said that now the statusbar is resized automatically inside the windowcallback. What about doing the same for minmax ?

Code: Select all

OpenWindow(0,50,100,400,300,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"Minimum Size") 
CreateStatusBar(0,WindowID()) 

Procedure MyWindowCallBack(WindowID,Message,wParam,lParam) 
  result = #PB_ProcessPureBasicEvents 
  If Message=#WM_GETMINMAXINFO 
      *pMinMax.MINMAXINFO = lParam 
      *pMinMax\ptMinTrackSize\x=100 
      *pMinMax\ptMinTrackSize\y=300 
      *pMinMax\ptMaxTrackSize\x=600 
      *pMinMax\ptMaxTrackSize\y=300 
      result = 0 
  EndIf 
  ProcedureReturn result 
EndProcedure 

SetWindowCallback(@MyWindowCallBack()) 

Repeat 
Until WaitWindowEvent() = #PB_Event_CloseWindow

Posted: Sat May 01, 2004 5:09 pm
by Flype
perhaps because this is a Windows trick and not a linux nor amiga one

Posted: Wed May 05, 2004 8:18 pm
by syntax error
I know the Amiga has window sizing limits.
Under Amiga BlitzBasicII there is this command:

SizeLimits Min Width,Min Height,Max Width,Max Height

Not sure about Linux. I agree that such a command would be welcome.

Posted: Fri Dec 01, 2006 3:38 pm
by nco2k
fred, any plans for this one?

c ya,
nco2k