| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. Get a QBitmap DC... #5724 Posted by: boltex 2005-01-20 03:50:27 | Hi when trying to print a bitmap with John White's Printer API I tried the following: (but GETDC returns error=0)
rtn=GetDeviceCaps(prt_DC, RASTERCAPS) IF rtn<>0 THEN bitmapdc=GetDC(bitmap.Handle) ' THIS FAILS !!! IF bitmapdc<>0 THEN ' Do a straight copy. 'Blit_BitMap(0, 0, 300, 200, bm_DC, 0, 0, SRCCOPY) ' Stretch the bitmap. 'Stretch_BitMap(0, 0, 400, 400, bm_DC, 0, 0, 200, 200, SRCCOPY)
rtn=ReleaseDC(bitmap.Handle, bitmapdc) IF rtn<>0 THEN ELSE showmessage("ReleaseDC failed") END IF ELSE showmessage("GetDC failed") END IF ELSE showmessage("GetDeviceCaps failed") END IF
I implore the powers of our lord Guidance for help & pity !!!!!!!!!
bolt | 2. Re: Get a QBitmap DC... #5727 | The author's user name in this forum is "yoingco", try to write him directly if he didn't come here recently. | 3. Re: Get a QBitmap DC... #5839 | try this
bitmapdc=bitmap.Handle 'GetDC(bitmap.Handle)
I've not tested it, but BitBlt work fine with the QBitmap handle | Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|