Original Post
I want to use a function to check if the Display Mode can handle the color format, but I always obtain an error at compilation(I use Visual C++ 6.0):
error C2664: ''CheckDeviceType'' : cannot convert parameter 3 from ''struct _D3DDISPLAYMODE *'' to ''enum _D3DFORMAT''
My code is:
IDirect3D8 g_pD3D;
D3DDISPLAYMODE d3ddm;
if(FAILED(g_pD3D->CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,&d3ddm, &d3ddm, FALSE)))
return FALSE;
This code is from the book "Programming Role-Playing game with DirectX"