I am working on a MFC application that allows the user to draw some lines to construct a diagram that I will then analyze. I need to be able to place an arrowhead on the end of a line once the ser selects the end of the line by lifting the mouse button as he/she drags the line around the Cview screen.
I am having trouble developing an algorithm using LineTo and MoveTo functions to draw the arrowhead based on the location of the end point of the line. I need the arrowhead to be the same size for all lines. The trouble I am having is due to the fact that the line may be drawn at any angle ( 0 degrees - 360 degrees ).
Does anyone have some code or ideas on how to do this? Is there a way to do it with a bitmap if LineTo and MoveTo do not suffice?