Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / Get a QBitmap DC...

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. 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
Message2. Re: Get a QBitmap DC...
#5727
Posted by: guidance 2005-01-20 12:10:35
The author's user name in this forum is "yoingco", try to write him directly if he didn't come here recently.
Message3. Re: Get a QBitmap DC...
#5839
Posted by: d-evolution 2005-02-14 00:54:57
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 • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥738.00 ·
 
 
¥1,480.00 ·
 
 
¥397.00 ·
 
 
¥950.00 ·
 
 
¥264.00 ·
 
 
¥1,005.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0