I have updated the code (main.cpp) - I have uploaded it to pastebin - the url is :
http://pastebin.com/sFRmk3rj
The file is called resize_test .txt so when you download it just change the name.
You will notice 3 things:
1. I stopped using hard coded numbers and have made some #defines at the top of the page.
much better and easier to do things that way.
2. So in the WM_SIZE message of the head_proc you will see the way the position of the windows are calculated.
So they now behave correctly - no overlapping.
3. You will see in the main_proc - that I have changed the initial positions/positions of the title_panel, and desc_panel
and desc_panel2 to 1,1,1,1 - thi same me a bit of typin effort - AND WM_SIZE is one of the first messages sent when
a window is first shown so all the windows will take their proper positions and sizes from the start.
/* Other stuff*/
It wasn't particularly that you were calculating the positions of
the windows using improper methods - it was just that we were sloppy
and it would only get worse the more code we added.