Hi Paul,
I saw in the forum two interesting threads that explain how to setup the min and max size values for a specific Window/form.
http://planetsquires.com/support/index.php?topic=1387.0
http://planetsquires.com/support/index.php?topic=1222.0
So to restrict window/form resize to specific values, I use this code :
Function FORM1_CUSTOM ( _
hWndForm As Dword, _ ' handle of Form
wMsg As Long, _ ' type of message
wParam As Dword, _ ' first message parameter
lParam As Long _ ' second message parameter
) As Long
Local MinMaxPtr As MINMAXINFO Ptr
Select Case wMsg
Case %WM_GETMINMAXINFO
MinMaxPtr= lParam
' specify the minimum value for dialog resize
@MinMaxPtr.ptMinTrackSize.x= 394
@MinMaxPtr.ptMinTrackSize.y= 333
End Select
End Function
It works without any problem; I have nevertheless three simple questions:
1. Do you plan to provide in FireFly3 a separate message handler for WM_GETMINMAXINFO instead of using the CUSTOM message handler ?
2. Do you plan to provide in FireFly3 in form properties the min and max size values for the height and width of a Window/Form?
3. Is-it possible to retrieve inside a FireFly project the initial height and width values that are set in the FireFly Designer for a specific Window/Form ?
Thanks
Jean-Pierre
Quote from: Jean-Pierre LEROY on September 27, 2009, 07:49:45 AM
1. Do you plan to provide in FireFly3 a separate message handler for WM_GETMINMAXINFO instead of using the CUSTOM message handler ?
I did not plan to separate that message. I doubt that it is a popular message that needs to have its own handler (unlike a message like WM_SIZE for example).
Quote
2. Do you plan to provide in FireFly3 in form properties the min and max size values for the height and width of a Window/Form?
No - I did not. If there is enough demand for such properties then of course I will add it.
Quote
3. Is-it possible to retrieve inside a FireFly project the initial height and width values that are set in the FireFly Designer for a specific Window/Form ?
Sure. You would have to create two global long variables (or a global Rect variable) to hold the values and then retrieve the sizes in the WM_CREATE handler. Use GetWindowRect rather than GetClientRect when determining the sizes because GetWindowRect would take into account the borders sizes of the form.