You work with WM_SIZE message. Try to switch to WM_WINDOWPOSCHANGED. I do remember the same problem even in the app with the property pages.
Win32 API: http://msdn.microsoft.com/
I attached a handler for this message.
MFC CWnd::OnWindowPosChanged http://msdn.microsoft.com/
you can add ON_WM_WINDOWPOSCHANGED()
He
http://www.codeguru.com/cp
Anyway, it is much better to the property pages as AndyAinscow said.
I found an example
There is WM_WINDOWPOSCHANGING and it is about WTL. But it works exactly as you want.





by: AndyAinscowPosted on 2009-09-15 at 10:01:59ID: 25336978
Why don't you use CPropertySheet and CPropertyPage instead of trying to do it yourself?