Hi all, I have been stuck on this problem for months and I really dont know where to bang my head. I am creating a DIB and punting it to the GDI so it can render the bitmap. But the engine is returning the surface object with drawing anything on it; meaning the buffer pointed by pvBits remains full of NULLS even after a call to the engine rendering functions. Some of my code goes like this: hHeap = GetProcessHeap(); pvBits= (LPBYTE)HeapAlloc(hHeap, HEAP_ZERO_MEMORY, (SIZE_T) (pPDev->HorzRes * pPDev->VertRes)); *phBmp = EngCreateBitmap(szlBmp, lBmpDelta, Format, BMF_TOPDOWN |BMF_NOZEROINIT, pvBits)); EngAssociateSurface((HSURF)*phBmp, (HDEV)pPDev->hpdev, 0)); pso = EngLockSurface((HSURF)*phBmp); then (assuming DrvLineTo) EngLineTo(pTempSurf, &clip, pbo, 10, 100, 40, 400, &rect, R2_COPYPEN | (R2_COPYPEN << 2));
// Just a test to see if it draws, note clipping fits drawing surface and brush is a solid black brush I tried it in many ways, but still the buffer remains all 0s. I dont really know what to do since our printer only takes bitmaps and I need to generate a bitmap. Should I do build my own graphics engine??
Thanks alot
Adam
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.