Restored from previous forum. Originally posted by MrVainSCL.
Hi PB
It isnt hard as it looks like...

For example you set the windowsize when open your app to 200x200 (width/height) and want to resize to 400x200 for example...
Code: Select all
[u]Example Graphic for 200x200 Window:[/u]
A B
+-------------------+
| |
| E F I J |
| +---+ +---+ |
| | 1 | | | 2 | |
| +---+ +---+ |
| G H K L |
| |
+-------------------+
C D
I feel me like an azkie artist

Ok, lets continue...
At programstart we must declare "winw = 200" and "winh = 200" this is where we will store the size for our window we want to open at programstart with this size... Now we have to check if the window was resized "#WM_SIZE" and if so, we must store the new width and height to our "winh" and "winw" variables... We can get the actual window height (distance between A and C) and window width (distance between A and B) everytime just using something like:
Code: Select all
"winw = WindowWidth() : winh = WindowHeight()"
Window A Example:
We have to create our two gadgets on the window and have to set the coordinates for this. If you want everytime the same height for the gadgets, we must fix this value, else our gadgets will be resized in height too... If we want only a resizing in the width, we have to do follwing points, using "ButtonGadget(#Gadget, x, y, Width, Heigth, Text$)" for example...
Code: Select all
#gadget = Let us use 1 for Gadget1
x = fixed position (E), for example 10 pixel from left
y = fixed position (E), for example 10 pixel from top
Width = not fixed! Only store our start val, 50 for example (F-E)
Height = fixed height! (G-E) let us say 10 pixel height
Text = Button1
When our window will now resized, we have the new windowsize and know the fixed and the new changed offsets for our gadgets and redraw it, using "ResizeGadget(#Gadget, x, y, Width, Height)"
Code: Select all
ResizeGadget ( 1, 10, 10, winw-150, 10) ; 200 org win width - org gad width = 150
So... this is only a really fast example turorial... Hope this explain you a little bit the technic behind resizing a complete app... Now its late and i will stop here... Maybe when having some time a will poste a working source example...!? Hope i have made no mistakes on this small reply...

Good luck
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten