Next time when you post a Question make sure that you explain clearly because the word "Shape" means different things to different people and its not a programming term. for you answer look at this
http://www.codeproject.com/KB/cpp/advanced_shape_control.aspx