If you have manually created a primitive then you must use SetVertexDeclaration. But how ever you don't have to do that when rendering geometry data from x files. Am sure those samples are x files, aren't they?
There's an exact vertex declaration equivalent for every FVF. And every mesh has a FVF property. So, you don't need to manually call IDirect3DDevice9::SetVertexDeclaration(), because ID3DXMesh::DrawSubset() function calls IDirect3DDevice9::SetVertexDeclaration() before calling SetStreamSource() and SetIndices().
There's no "hard", and "the impossible" takes just a little time.