I'm new for window application development, currently I am working at a flow chart winform project. I need draw a control like the picture show(copy from MS word, by Insert->Shapes->Block Arrows). [Arrow shape] [1]: https://i.stack.imgur.com/P7XBL.png This arrow can be moved, resized and reshaped. I have looked for some solutions, but most of them are regular shapes. Could I create a list and put all the 7 points of the arrow to this list, then draw the line between the points, one line by one line(Graphics::DrawImage)? If yes, then the next question is, how can I fill this irregular shape with some solid color? And how can I move this shape? If I redraw it, how to erase the old shape?
Current I can drag and move a control using following code, but for this irregular shape, how to get started? This project is C++/CLR, based .net, either C# or C++/CLI idea are welcome.
void MouseDown(Object^ sender, MouseEventArgs^ e)
{
selected_control = safe_cast<Control^>(sender);
is_draging = true;
drag_start_point = gcnew Point(e->X, e->Y);
selected_control->Capture = true;
}
void MouseUp(Object^ sender, MouseEventArgs^ e)
{
is_draging = false;
selected_control->Capture = false;
}
void MouseMove(Object^ sender, MouseEventArgs^ e)
{
if (is_draging)
{
selected_control->Left = Math::Max(0, e->X + selected_control->Left - drag_start_point->X);
selected_control->Top = Math::Max(0, e->Y + selected_control->Top - drag_start_point->Y);
}
}