Frage

I have main window of my app divided into three areas (top, content, bottom). Some of controls are docked to bottom or to top and rest of controls are placed in 'content' area between top and bottom area.

If the total height of controls in 'content' area is greater than available space, some controls overlay controls docked to bottom. Similar problem occurs when I scroll up 'content' area. Some controls overlay controls docked to top.

How to limit area, where a child control(window) can be drawn? I found function SetWindowRgn(), but I'm not sure it's is the correct way, how to limit child window drawing area.

thx

War es hilfreich?

Lösung

The best way is to make your controls children of another child window with the WS_CLIPCHILDREN style set on it. That also makes it easy if you want to allow those separate areas to scroll independently of each other - all you have to do is reposition the child controls in response to the scroll offsets and they'll automatically be clipped to the parent window's borders.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top