I would like to know how to resize my child windoes by proportion whenever the user resizes the main window. I've tried so many things and searched through so many sites but have not come across anything helpful. Thanks in advance!
Posted on 2003-12-18 10:47:21 by SubzeroHeat
If you are using RadASM, Kir has an excellent addin that will take the grunt work out for you:

http://www.kirsoft.com.ru/download/asm/KSresizer/
Posted on 2003-12-18 10:57:25 by donkey
Hey thanks.
Posted on 2003-12-19 01:22:42 by SubzeroHeat
SubzeroHeat,
I would like to know how to resize my child windoes by proportion whenever the user resizes the main window. I've tried so many things and searched through so many sites but have not come across anything helpful. Thanks in advance!
I would think that processing the WM_SIZE message of the main window, then using the MoveWindow API on the child window would do the trick. Ratch
Posted on 2003-12-19 12:10:36 by Ratch
SubzeroHeat,

I learned alot from KetilO 's RadASM GridDemo program. If you have the most excellent RadASM package,

http://radasm.visualassembler.com

and the RaGrid Project addin,

http://radasm.visualassembler.com/projects/projects.html

look in the CustCtl\Grid\GridDemo folder, look in the GridDemo.asm program for the WM_SIZE handler.

The handler reacts to a change in the size of the main window, then resizes the grid and repositions the buttons below the grid so that they maintain the same relative position to the bottom right corner of the main window.

farrier
Posted on 2003-12-19 13:44:11 by farrier
Thanks but what I meant was this. Upon receiving the WM_SIZING message, I want the child windows to resize and rearrange themselves to the the same proportions as the resized main window so that they look the same as when they were first created only that they haf been resize to accomodate the extra space. I haf tried using EnumChildWindows and then resizing each child window's height and width in proportion to the gain in height and width by the main window, but they will overlap each other. I dont noe in what way to reposition them.
Posted on 2003-12-21 00:22:32 by SubzeroHeat
SubzeroHeat,
I am sending you the same example file I sent benny for his question in the "Scroll Bar Colors" thread. As you can see, the sizing of the child window scroll bar controls are done in proportion to the client window area. Resize the window and the scroll bars get resized too. I also included the C program from Charles Petzold's Programming Windows, from which this program was transcribed. Ratch
Posted on 2003-12-21 12:54:09 by Ratch
Thanks Ratch your example gave me a good idea on how to code mine and donkey's suggestion of using KSResizer is also great. However I seem to face another proble. While trying to migrate to RadASM in order to use KSResizer, I suddenly face a problem with my exe even though I haven't changed my code. RadASM can compile it but when run, XP gives me an error message saying that "The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem". I am totally stumped. I have tried using other RC files but the problem doesnt seem to lie in the resource file even though the code wasn't changed at all. Now when I try to compile it in ASMEdit, it still gives the same problem when run but it can build without any errors. In RadASM, an error will only be shown when it is run with the path of the executable then a value of 0000000 and then it says Make error(s) detected even though the application built without errors.
Posted on 2003-12-24 07:14:26 by SubzeroHeat
SubzeroHeat,
You are on your own now. I have no idea what RadASM is or how to use it. I am a minimalist with respect to coding. I only use a text editor, MASM, GORC, and LINK. That's all I know, and it has served me well. It seems like a lot of posts in this forum are from folks fighting with their development tools instead of actually coding for a solution to a problem. Good Luck. Ratch
Posted on 2003-12-24 09:46:43 by Ratch
SubzeroHeat, can you post the output from assembly and linking? It is not clear to me where the error is occuring, but the executable created does not appear to be valid?
Posted on 2003-12-24 10:11:41 by bitRAKE
I'm posting the executable. I'll try to migrate my project one more time to RadASM and get the error message. The strangest thing is when I moved all the files to another folder, it immediately could start compiling with ASMEdit. I have been using ASMEdit all this while. No offence to Ewayne but I just realised that RadASM is so much better. I'd really like to use it. In the zip file, I have included other important files that RadASM may have altered and created.
Posted on 2003-12-25 08:08:35 by SubzeroHeat
Hi SubzeroHeat,

If you could include the RAP file it would be easier to look at the assembly options. RadASM requires that you build your resources using the resource editor but from the appearance of your rc files you have done that. Is it possible to zip the project (without the minor files (.obj,.res etc)) and email it to me, I will figure out what's wrong.
Posted on 2003-12-25 13:35:47 by donkey
Ok tomorrow I will try to remigrate my whole project to RadASM and give you the information that you need. I really want to use RadASM but I'm stuck with ASMEdit for now.
Posted on 2003-12-27 09:11:49 by SubzeroHeat