I have two toplevel windows, one is placed directly over the other one and they are both the same width and hight and position. When the top window is moved I need to move the bottom window simultaneously. I have tried handing the WM_MOVING event of the top window and then placing code in that event to move the bottom window.
This works, but it is not smooth. I need both windows to have their position change at the exact same time so that it is seamless!!
How can I do this?
Is there a way? could someone post an example?
P.S Adding one window as a child window is absolutely not an option for me. Just so you know.
The only way I can think of is to handle the WM_MOVE message in the top window; and post the same message to the bottom window. I wouldn't expect this to be really smooth, though.
Oh, another option is to hide the bottom window, and move it once the top is done moving...
Is your top top-level window partially transparent?
If yes - you are out of luck.
If no - as MrViggy suggested, hide the bottom window. Actually, don't even show it later - it is not visible anyway.
Did you look at DeferWindowPos?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinWindows - replacement windows manager for Visual Studio, and more...
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.