http://a1vbcode.com/app-1332.asp
Look there. It might solve your problem. I'm not big on API'S anymore, but you might be able to modify to do what you want. WS_CHILD may not work, but perhaps WS_CLIPSHILDREN will. (that's a guess) The link may help you out.