When I use the D3DX shape creation functions to generate a mesh, there are no texture coordinates in the vertices. How can I set texture coordinates?
To add texture coordinates, you will first have to use the D3DXCloneMeshFVF function to create a duplicate of the mesh with a new vertex format which contains elements for storing texture coordinates (tu,tv). For an example of how to do this, take a look at the source code in Spherical Texture Mapping.