You don't normally transform cylinder into the cone using matrices. This is because it involves scaling of 2 components where scale factor is dependent on the 3rd component.
I think you can build matrix like that by building "look at" matrix (gluLookAt or D3DXMatrxiLookAtLH) and multiplying it with perspective matrix (gluPerspective or D3DXMatrixPerspectiveFovLH), but I seriously doubt you will be able to render that cylinder with either OpenGL or D3D. This is because in order for projection to work 3D rendering uses 4th vector component - W which is calculated by multiplying vectors with projection matrix. W component is typically hidden, and available only through shaders. Messing with this component normally screws up any geometry, and you can't transform cylinder into cone without using w component. I.e. if you transform cylinder into cone, you will have to use W, this will screw up projection transform.
I suggest to build cylinder normally - from vertices. This isn't hard in both D3D and OpenGL.
If you really want to transform cylinder into cone, writing vertex shader for transforming cylinder will be easier, although making sure all normals are all right might be a problem.
If you want to know which objects hit light cone, use math and collision detection. This isn't hard.
If you want to render objects visible within light cone, make additional render target (or framebuffer), viewport or whatever, and render objects visible from light's point of view.
About light cutoff angle.
Given point P, light position L, and light direction LDir, and cutoff angle you can easily check if P is within light cone. To do that, you'll need cosine of either full or half of cutoff angle (depends on whether cutoff angle is calculated relative to light direction, or determines width of the cone). Make vector PDir = P - L, normalize PDir, and calculate dot product between normalized PDir and normalized LDir, this will give cosine of angle between light direction at point P. IF cosine (between PDir and Ldir) is larger cosine of light cone, then point is within light cone.