Master RESIZE setting on Form; ancillary settings on controls?

Started by John Montenigro, January 11, 2010, 04:33:23 PM

Previous topic - Next topic

Jean-pierre Leroy

Paul,

I have a question: why do you re-designed the "Resize rules" again; what were the limitations (if any) in the current implementation?

Jean-Pierre

Rolf Brandt

Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Roger Garstang

I like the Visual Studio look. Didn't we talk about it looking that way early on?

What are the list of options that the combos have? Without seeing the choices available I couldn't tell if fixed meant in place or fixed to edge. And, do all the custom options popup a box for percent? Not sure I understand how the percent will work or be accurate with only 0-100, but we'll see when it comes out I guess...unless you let us put it through its paces before then.

Brian Chirgwin

Quote from: TechSupport on April 30, 2010, 04:04:20 PM
Quote from: Rolf Brandt on April 30, 2010, 01:17:00 PM
will there be any compatibility issues with projects that use the "old" resize dialog?

There should not be. When a form is loaded all controls are checked for the older method and they are converted automatically to the new method. It should be pretty seamless to the user. Of course, I need to test this to ensure that the conversion works as intended.

I have attached a screenshot of the new dialog. It is now fully functional and so far I am very happy with the resulting generated code.

Hi Paul,

I had a Egrid32, I think MLG could have been used as well on the left side that I wanted proportional sizing. With a grid which has internal columns I wanted to auto size proportionally as well. It would be great if it were possible to augment the control resizing with custom code for controls that have internal layout. 

I've done a test and a WM_Size on the control is sent after the resize is complete, so the only thing required is getting the original size. It would be great if two functions were added. I assume you are storing this information to do the proportional sizing.

FF_CONTROL_GETORIGLOC
FF_CONTROL_GETORIGSIZE

The work like FF_CONTROL_GETLOC and FF_CONTROLGETSIZE accept return the original sizes at startup.


Thanks,

Brian



Paul Squires

Hi Brian,

Couldn't you achieve the same effect by saving the control's size in a global rect during WM_CREATE for the Form?


Global gGridRect As Rect

'--------------------------------------------------------------------------------
Function FORM1_WM_CREATE ( _
                         hWndForm As Dword, _      ' handle of Form
                         ByVal UserData As Long _  ' optional user defined Long value
                         ) As Long

   ' Get the control's size and position based on screen positioning
   GetWindowRect HWND_FORM1_GRID1, gGridRect
   
   ' Convert from screen positioning to relative to the control's parent form
   MapWindowPoints %HWND_DESKTOP, HWND_FORM1, gGridRect, 2
   
   ? Str$(gGridRect.nLeft)  & _
     Str$(gGridRect.nTop)   & _
     Str$(gGridRect.nRight) & _
     Str$(gGridRect.nBottom)
   

End Function


Paul Squires
PlanetSquires Software