I've done some search on MSDN but didn't find what I need in the right language.
I'm using VC++ 2005 to create a custom control modeling a sort of graphical equalizer. A part of this control would be another custom control, a sort of panel which can be dragged horizontally and resized to set center frequency and bandwidth.
My idea is to inherit from UserControl and add a Panel. How can I make this control draggable

creating a draggable custom control [VC++]
SomeRandomName
GrahamY
TarPista
87jerome
Know I only have to discover if all borderstyles have the same width and I'm done.
Thanks again.
Walter Beach
Do you also know how to avoid that the control goes out of it's container
I tried the following code (c++)
private: System::Void panel1_MouseMove(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
if(dragging)
{
Point pos = this->panel1->PointToScreen(e->Location);
int newX = panelPos.X+pos.X-mousePos.X;
if (((newX + panel1->Width) < panel1->Parent->Right)
&& (newX > panel1->Parent->Left))
{
this->panel1->Left=newX;
}
}
}
to replace the MouseMove event you suggested, but the Control doesn't stop where I want.
Oddly, if I substitute 0 (which is the actual value) to panel1->Parent->Left, the code works.