I don't think Win32::API SetParent call is need. Because -parent => option, and WS_CHILD style already do the job.
I remove SetParent Call and it's work for me Laurent. ----- Original Message ----- From: Steve Pick To: Jez White ; Stephen Pick ; Win32-GUI Sent: Friday, January 16, 2004 8:13 PM Subject: Re: [perl-win32-gui-users] Scroll bar example "is it possible to use a scroll bar within a window, and not on one of it's edges?" Yes, it is. Although I did not implement this yet. What you get when you do it is one of those scrollbars where the scroll handle blinks on focus. It is theoretically possible to add scrollbars to anything, but what I was suggesting you do was as follows: Create a child window with WS_CHILD and no WS_CAPTION. (-pushstyle => WS_CHILD, -popstyle => WS_CAPTION - you might need to -popstyle => WS_BORDER as well), and add scrollbars to it. Assign it a parent using the SetParent() method I previously described. Now what you will have is a flat, captionless, borderless "pane" with scrollbars, inside your window. It cannot be moved or resized. Now repeat the process (create another child window...), but this time when you call SetParent(win, parent), you should make the parent window the child you created above. What you now have is a window in a window in a window. It is the last child you created that you can put your widgets (buttons etc) in. When your scrollable child receives Scroll messages, you should move the window with buttons in appropriately. The attached script should demonstrate things a little better. I don't think this is the most intuitive way to do things, I do know that the only thing that receives the Scroll event is a window or dialogbox, because I coded it that way. I'm thinking of removing this explicit limitation on what can be scrolled. You can still add scrollbars to and set scroll parameters on any widget. Steve