用鼠标拖动只能改变控件width与height大小的有关问题

用鼠标拖动只能改变控件width与height大小的问题
情况描述:
form上有个panel,这个panel上有个pagectrol。panel的align为alBottom,pagectrol的align为alClient。目前实现了鼠标拖动panel改变其自身大小,存在的问题是:鼠标拖动panel改变其height时,pagectrol的height会保持充满panel(往top或者bottom拖 都没问题);鼠标拖动panel改变其width时,pagectrl不会充满panel(往left或者right拖时都有问题)
我的目标:
不管怎么拖panel,pagectrol都要充满panel。
现在是木有一点头绪!求各位大哥大姐赐教啊!
对了,实现鼠标拖动改变panel大小的代码是从妖哥的回复中收来的。如下:
C/C++ code

__fastcall   TForm1::TForm1(TComponent*   Owner)
                :   TForm(Owner)
{
        Panel1-> BevelInner   =   bvNone;
        Panel1-> BevelOuter   =   bvNone;
        ::SetWindowLong(Panel1-> Handle,   GWL_STYLE,
                GetWindowLong(Panel1-> Handle,   GWL_STYLE)   |   WS_SIZEBOX);
        ::MoveWindow(Panel1-> Handle,   Panel1-> Left,   Panel1-> Top,
                          Panel1-> Width,   Panel1-> Height   +   1,   true);
}
//---------------------------------------

void   __fastcall   TForm1::Panel1MouseDown(TObject   *Sender,
            TMouseButton   Button,   TShiftState   Shift,   int   X,   int   Y)
{
        if(Panel1-> Cursor   ==   crArrow   )
        {
                //释放原有鼠标捕捉状态,
                //并同时送出鼠标单击位置等同于窗口标题栏可拖曳窗口的属性
                ::ReleaseCapture();
                SNDMSG(Panel1-> Handle,   WM_NCLBUTTONDOWN,   HTCAPTION,   0);
    }
}
//---------------------------------------
void   __fastcall   TForm1::Panel1MouseUp(TObject   *Sender,   TMouseButton   Button,
            TShiftState   Shift,   int   X,   int   Y)
{
Panel1-> Cursor   =   crArrow;
}
//---------------------------------------



------解决方案--------------------
panel的align为alBottom,表示宽度跟窗口一样
你改为alNone,试下

附加一句,不是有专门的窗口分割控件