LPDIRECTDRAWSURFACE7 lpDDSButtons=NULL;
// surface loading code
....
HDC hdc;
lpDDSButtons->GetDC(&hdc);
COLORREF PreColor = GetPixel(hdc, X-x+normalState.left, Y-y+normalState.top);
lpDDSButtons->ReleaseDC(hdc);
if (PreColor != RGB(0,255,0))
{
return true;
}
// but I can't do this ????
LPDIRECTDRAWSURFACE7* mtempSurface;
mtempSurface = &lpDDSButtons;
HDC hdc;
mtempSurface->GetDC(&hdc);
COLORREF PreColor = GetPixel(hdc, X-x+normalState.left, Y-y+normalState.top);
lpDDSButtons->ReleaseDC(hdc);
if (PreColor != RGB(0,255,0))
{
return true;
}
I get compiler errors, its like it doesnt realize that mtempSurface is a pointer to lpDDSButtons
any help appreciated thanks











