W32HIT: Hit Testing Lines and Curves in Win32 W32HIT is a Microsoft(R) Win32(R) sample application that demonstrates techniques for hit testing lines and curves. The sample is a modification of the W32PEN sample. Hit testing of lines uses vectors to determine the distance of a mouse click from the line. Two methods illustrate hit testing of Bézier curves. The first method uses code from the public domain to regenerate the points of the curve. The distance from the mouse click to the nearest point on the curve is used to determine if the curve has been hit. The second method uses the path functions of Win32. The curve is flattened into line segments. The line hit- testing code is then used to determine if the curve has been hit. The application also demonstrates the use of enhanced metafiles, clipping regions, hit testing within a region, and use of custom cursors over a region. W32HIT accompanies the "Win32: Hit Testing Lines and Curves"msdn_hittest2 technical article in the Microsoft Development Library. W32HIT was built using Microsoft Visual C++(TM) version 1.0 and tested under Microsoft Windows NT(TM) version 3.1. KEYWORDS: CD7; BeginPath; Bezier; CreateEnhMetaFile; CreateRctRgnIndirect; DeleteEnhMetaFile; ExtCreatePen; FlattenPath; GetPath; Hit-testing; InvalidateRect; Polyline; SelectClipRgn; SetGraphicsMode; SetWorldTransform; vectors