Guest_imported
New member
- Jan 1, 1970
- 0
I'm having a problem with the colour keys for icons and stuff. The book I am reading says there are two ways of setting the colour keys of a surface.
Either by setting the dwColourKeyrange (or whatever) members on the DDSURFACEDESC before you initialise the surface or by calling a function which sets the colour keys. Either way I am having the same problem, which is assigning the colour values. My book does it like this
dwColourKeyHighblah = RGBQUAD(x,y,z);
dwColourKeyLowsomething = RGBQUAD(a,b,c);
and yes, I cant remember offhand what these variables are called. whenever I do this the compiler gets stuborn with "RGBQUAD does not take 3 arguments". I've tried other amounts of arguments, instantiating an RGBQUAD object and assigning to it, in fact everything I can think of. the RGBQUAD turns out to be a DWORD, but other than this i'm stumped.
Does anybody know how to assign the desired colour values to colourkey range variables? I would be very gratefull for help.
dedbeet.
ps
I'm using directX7 (as in LPDIRECTDRAW4) because I have a book on it, i'm planning to learn the latest directX later.
Either by setting the dwColourKeyrange (or whatever) members on the DDSURFACEDESC before you initialise the surface or by calling a function which sets the colour keys. Either way I am having the same problem, which is assigning the colour values. My book does it like this
dwColourKeyHighblah = RGBQUAD(x,y,z);
dwColourKeyLowsomething = RGBQUAD(a,b,c);
and yes, I cant remember offhand what these variables are called. whenever I do this the compiler gets stuborn with "RGBQUAD does not take 3 arguments". I've tried other amounts of arguments, instantiating an RGBQUAD object and assigning to it, in fact everything I can think of. the RGBQUAD turns out to be a DWORD, but other than this i'm stumped.
Does anybody know how to assign the desired colour values to colourkey range variables? I would be very gratefull for help.
dedbeet.
ps
I'm using directX7 (as in LPDIRECTDRAW4) because I have a book on it, i'm planning to learn the latest directX later.