Scrollbar in child dialog not scrolling

Hi all, I have a CDialog subclass in which the default constructor calls Create with a simple template that has no controls, but for which the vertical scrollbar property is set. I then programmatically add a series of group boxes (implemented as buttons) and in turn add dialogs created from another template to those. My problem is, despite my groupbox child dialogs extending well beyond the horizontal limit of my dialog, the scrollbar does not scroll the controls. What am I doing wrong?

Thanks.

class CDlgJoystickRoles : public CDialog
...

CDlgJoystickRoles::CDlgJoystickRoles(CDlgOptions* pParent): CDialog(CDlgJoystickRoles::IDD, pParent)
{
EnableAutomation();
Create(IDD, pParent);
...
pJoystickPanel = new CButton();
pJoystickPanel->Create(pIOJoystick->GetName().c_str(), WS_VISIBLE|WS_CHILD|BS_GROUPBOX, sJoystickRect, this, 0);
...

}
[952 byte] By [mbenic] at [2007-11-20 1:11:13]