I bought the same book, the book actually comes with 9c of direct x. to fix the problem just leave out the D3DXSPRITE_ALPHABLEND so it would look like sprite_handler->Begin(); , and the draw function takes 7 parameters now, which are ;
LPDIRECT3DTEXTURE9, RECT, D3DVECTOR2, D3DVECTOR2, FLOAT, D3DVECTOR2, D3DCOLOR
so the code in the book would be changed to
sprite_handler->Draw(caveman_image, &srcRect, NULL, NULL, 0.0f, &position, D3DCOLOR_XRGB(255,255,255));
also you will need to change the line where you create the position from
D3DVECTOR3 position((float)caveman.x, (float)caveman.y, 0);
Notice there is no 3rd parameter
This should allow you to compile.