Hello I want to display an image in runtime I write this :
CreateRunObject function
Code:
rdPtr->rHo.hoX = cobPtr->cobX;
rdPtr->rHo.hoY = cobPtr->cobY;
rdPtr->rHo.hoImgWidth = edPtr->swidth;
rdPtr->rHo.hoImgHeight = edPtr->sheight;
rdPtr->wImages = edPtr->wImages;
DisplayRunObject function :
Code:
	LPRH rhPtr = rdPtr->rHo.hoAdRunHeader;
	mv _far	* mV = rhPtr->rh4.rh4Mv;
	LPSURFACE ps = WinGetSurface((int)rhPtr->rhIdEditWin);
	if ( ps != NULL )		// Do the following if this surface exists
	{
		RECT rc;
		rc.left = rdPtr->rHo.hoX;
		rc.top = rdPtr->rHo.hoY;
		rc.right = rc.left + rdPtr->rHo.hoImgWidth;
		rc.bottom = rc.top + rdPtr->rHo.hoImgHeight;
		int x = rc.left;	// get our boundaries
		int y = rc.top;
		int w = rc.right-rc.left;
		int h = rc.bottom-rc.top;
		int iWidth = 0;
		int iHeight = 0;
		cSurface* is = NewSurface();			// New surface variable for us to use

		is->Create(4, 4, ps);
		::LockImageSurface(rhPtr->rhIdAppli, rdPtr->wImages, *is, LOCKIMAGE_READBLITONLY);
		iWidth = (rdPtr->iImagesWidth > w)? w: rdPtr->iImagesWidth;
		iHeight = (rdPtr->iImagesHeight > h)? h: rdPtr->iImagesHeight;
		is->Blit(*ps, x, y,0,0,iWidth, iHeight, BMODE_TRANSP, BOP_COPY, 0);
		::UnlockImageSurface(*is);
		DeleteSurface(is);
WinAddZone(rhPtr->rhIdEditWin, &rc);
	}
But the image not display
this is my Flags :
Code:
#define	OEFLAGS	(OEFLAG_SPRITES|OEFLAG_BACKSAVE|OEFLAG_QUICKDISPLAY /*|OEFLAG_INTERNALBACKSAVE*/ )
#define	OEPREFS	(OEPREFS_GLOBAL |OEPREFS_BACKSAVE|OEPREFS_KILL|OEPREFS_BACKEFFECTS|OEPREFS_SCROLLINGINDEPENDANT|OEPREFS_INKEFFECTS)
Can you help me ?