Hi friends,
I am trying to load an image to an overlay surface in MS windows 5.0
device.
I want to make the surface transparent. I guess for that we need to
use colorkeying mechanism.
However when I call UpdateOverlay , its returning E_INVALIDARG.

Please help.


DDOVERLAYFX fx;
memset(&fx, 0, sizeof(fx));
fx.dwSize = sizeof(fx);
fx.dckDestColorkey.dwColorSpaceLowValue = 0;
fx.dckDestColorkey.dwColorSpaceHighValue = 0;
fx.dckSrcColorkey.dwColorSpaceLowValue = 0;
fx.dckSrcColorkey.dwColorSpaceHighValue = 0;

DWORD flags = DDOVER_SHOW | DDOVER_KEYDESTOVERRIDE;

// Show the overlay surface
HRESULT hr;
hr = overlay->UpdateOverlay(&rcSrc, primary, &rcDst, flags, &fx);

I am a novice in multimedia technology. Please let me know I have
missed something.

Thanks in Advance.

Sunil Raj