I learn DirectX (DirectX 9) from www.directxtutorial.com and using visual studio 2012 in windows 8. d3dx9 (d3dx) replace by other header like DirectXMath, therefore I replaced all that is needed, but there is a problem - convert XMVECTOR to D3DVECTOR and to D3DCOLORVALUE.
The problem code (The problem written - /problem!/):
void init_light(void) {
D3DLIGHT9 light; // create the light struct
D3DMATERIAL9 material; // create the material struct
ZeroMemory(&light, sizeof(light)); // clear out the light struct for use
light.Type = D3DLIGHT_DIRECTIONAL; // make the light type 'directional light'
light.Diffuse = D3DXCOLOR(0.5f, 0.5f, 0.5f, 1.0f); /*problem!*/ // set the light's color
light.Direction = D3DXVECTOR3(-1.0f, -0.3f, -1.0f); /*problem!*/
d3ddev->SetLight(0, &light); // send the light struct properties to light #0
d3ddev->LightEnable(0, TRUE); // turn on light #0
ZeroMemory(&material, sizeof(D3DMATERIAL9)); // clear out the struct for use
material.Diffuse = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f); /*problem!*/ // set diffuse color to white
material.Ambient = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f); /*problem!*/ // set ambient color to white
d3ddev->SetMaterial(&material); /*set the globably-used material to &material*/ }