Re: Restrining a child window's positioning within parent window
- Posted by "Greg Haberek" <ghaberek at gmail.com> Jun 05, 2006
- 617 views
> I have a Parent window containing many child windows. > > I want to restrain any child window from being moved out of parent window's > client area (using win32lib). I think what you want is the WS_CLIPCHILDREN style. This prevents the child windows from being moved outside the parent's client area.
include Win32Lib.ew without warning constant Main = create( Window, "Restrict Child Window Movement Demo", 0, Default, Default, 640, 480, WS_CLIPCHILDREN ), Child1 = create( Window, "Child Window", Main, Default, Default, 320, 240, w32or_all({WS_CHILD,WS_VISIBLE}) ) WinMain( Main, Normal )