Here you go:
Code: Select all
;
; Max/Min Window size tracking..
;
Procedure SizeCallback(WindowID, Message, wParam, lParam)
; Here is the trick. The GETMINMAXINFO must be processed
; and filled with min/max values...
;
If Message = #WM_GETMINMAXINFO
*SizeTracking.MINMAXINFO = lParam
*SizeTracking\ptMinTrackSize\x = 100
*SizeTracking\ptMinTrackSize\y = 100
*SizeTracking\ptMaxTrackSize\x = 600
*SizeTracking\ptMaxTrackSize\y = 300
EndIf
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(0,10,10,200,200,#PB_Window_SystemMenu | #PB_Window_SizeGadget, "Resize me !")
SetWindowCallback(@SizeCallback())
Repeat
Until WaitWindowEvent() = #PB_EventCloseWindow
EndIf
(originally posted by fred ages ago

)
Phant0m``:
If you allready have another callback, don't set this up as another one,
because you can only have 1 callback procedure at a time.
(So if you add another one, the first won't work anymore)
Instead, just copy the code inside this callback procedure into your
own one. This should work.
Timo