Re: Restrining a child window's positioning within parent window

new topic     » goto parent     » topic index » view thread      » older message » newer message

> 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 )


new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu