Archived

This topic is now archived and is closed to further replies.

santi_productions

Does SetPalette function exist in DDRAW7?

Recommended Posts

I was programming my own Astroids clone and when I went to attach my palette to my primary surface, I used this code but got an error: // attach palette to primary surface if (FAILED(lpdd->SetPalette(lpddpal))) { // error } // end if I got the following error: --------------------Configuration: Astroids - Win32 Debug-------------------- Compiling... WinMain.cpp C:\Program Files\DevStudio\MyProjects\Astroids\WinMain.cpp(96) : warning C4101: ''buffer'' : unreferenced local variable C:\Program Files\DevStudio\MyProjects\Astroids\WinMain.cpp(223) : error C2039: ''SetPalette'' : is not a member of ''IDirectDraw7'' c:\dxsdk\include\ddraw.h(1243) : see declaration of ''IDirectDraw7'' Error executing cl.exe. Astroids.exe - 1 error(s), 1 warning(s) Atleast I got DirectX to work! lol! John DiSanti of Santi Productions.

Share this post


Link to post
Share on other sites
You are attempting to call IDirectDraw7::SetPalette instead of IDirectDrawSurface7::SetPalette. The IDirectDraw7 interface has no method named SetPalette and that is why you are getting the error during compile time.

Share this post


Link to post
Share on other sites