This function converts a 3D point into screen coordinates but it returns a vector3. What is the point in the Z value? why doesn't it just return a D3DXVECTOR2?
The Z value represents the depth dimension. Think of it as far behind the screen the object is. This is useful for deciding which object the user intended to select when picking a point on the screen, among other things. The information is generated as a result of the 3D Matrix multiplications that Vec3Project uses.