// Here, we grab DC's and stuff from vfw and stash it into our own // instance info. We also get our movieinfo, which is the structure // that has the actual hotspots in it. It's in a global variable, even // though I don't like global variables... static LONG NEAR PASCAL AVIDrawBegin(PINSTINFO pi, ICDRAWBEGIN FAR *lpicd, LONG cbicd) { LONG l; l = AVIDrawQuery(pi, lpicd->lpbi); if ((l != 0) || (lpicd->dwFlags & ICDRAW_QUERY)) { return l; } pi->hdc = lpicd->hdc; pi->xDst = lpicd->xDst; pi->yDst = lpicd->yDst; pi->dxDst = lpicd->dxDst; pi->dyDst = lpicd->dyDst; pi->xSrc = lpicd->xSrc; pi->ySrc = lpicd->ySrc; pi->dxSrc = lpicd->dxSrc; pi->dySrc = lpicd->dySrc; SetStretchBltMode(pi->hdc, COLORONCOLOR); if (!DrawDibBegin(pi->hdd, pi->hdc, pi->dxDst, pi->dyDst, lpicd->lpbi, pi->dxSrc, pi->dySrc, 0)) { return ICERR_UNSUPPORTED; } if (pi->hddb) { DisintegrateMemoryDC(pi); } CreateMemoryDC(pi); pi->lpMovie = pMovieInfo; return ICERR_OK; }
// Here, we grab DC's and stuff from vfw and stash it into our own // instance info. We also get our movieinfo, which is the structure // that has the actual hotspots in it. A handle to it has been stuck // on the window with SetProp, so we get the window handle and snag it // with GetProp. static LONG NEAR PASCAL AVIDrawBegin(PINSTINFO pi, ICDRAWBEGIN FAR *lpicd, LONG cbicd) { LONG l; l = AVIDrawQuery(pi, lpicd->lpbi); if ((l != 0) || (lpicd->dwFlags & ICDRAW_QUERY)) { return l; } pi->hdc = lpicd->hdc; pi->xDst = lpicd->xDst; pi->yDst = lpicd->yDst; pi->dxDst = lpicd->dxDst; pi->dyDst = lpicd->dyDst; pi->xSrc = lpicd->xSrc; pi->ySrc = lpicd->ySrc; pi->dxSrc = lpicd->dxSrc; pi->dySrc = lpicd->dySrc; SetStretchBltMode(pi->hdc, COLORONCOLOR); if (!DrawDibBegin(pi->hdd, pi->hdc, pi->dxDst, pi->dyDst, lpicd->lpbi, pi->dxSrc, pi->dySrc, 0)) { return ICERR_UNSUPPORTED; } if (pi->hddb) { DisintegrateMemoryDC(pi); } CreateMemoryDC(pi); { HANDLE hglb; hglb = GetProp(lpicd->hwnd,szDrawPropName); if (hglb) { pi->lpMovie = (PMOVIEINFO) GlobalLock(hglb); pi->hMovie = hglb; } else { pi->lpMovie = NULL; pi->hMovie = NULL; } } return ICERR_OK; }