Guidance
指路人
g.yi.org
software / rapidq / Examples / Graphics & Animation / BitBlt / bmp.rqb

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

  
     $OPTIMIZE ON
     $TYPECHECK ON
     $INCLUDE "rapidq.inc"
     $ESCAPECHARS ON

'WinAIP
'DECLARE FUNCTION CreateCompatibleBitmap ALIAS "CreateCompatibleBitmapA" LIB "Gdi32" (hdc AS LONG, nWidth AS LONG, nHeight AS LONG) AS LONG
'DECLARE FUNCTION SelectObject ALIAS "SelectObjectA" LIB "Gdi32" (hdc AS LONG, hgdiobj AS LONG) AS LONG
     DECLARE FUNCTION GetDC LIB "User32" ALIAS "GetDC" (hWnd AS LONG) AS LONG
     DECLARE FUNCTION BitBlt LIB "Gdi32" ALIAS "BitBlt" (hdcDest AS LONG, nXDest AS LONG, nYDest AS LONG, nWidth AS LONG, nHeight AS LONG, hdcSrc AS LONG, nXSrc AS LONG, nYSrc AS LONG, dwRop AS LONG) AS LONG
'DECLARE FUNCTION DeleteObject ALIAS "DeleteObjectA" LIB "Gdi32" (hObject AS LONG) AS LONG
     CONST SRCCOPY = &H00CC0020


'My SUBs and FUNCTIONs
     DECLARE SUB Button_OnClick

     CREATE Form AS QFORM
      Height = 300
      Width = 300
      Center
      CREATE Button AS QBUTTON
       CAPTION = "&Go!"
       Top = 35
       Left = 5
       OnClick = Button_OnClick
      END CREATE
     END CREATE
     CREATE Bitmap AS QBITMAP
      Height = 25
      Width = 25
      BMP = "rq.bmp"
     END CREATE

     Form.SHOWMODAL

     SUB Button_OnClick
	'DIM hBMP AS LONG
	'hBMP = CreateCompatibleBitmap(BMP.Handle, 25, 25)
	'SelectObject(GetDC(Form.Handle), hBMP)
      BitBlt(GetDC(Form.Handle), 100, 100, 25, 25, Bitmap.Handle, 0, 0, SRCCOPY)
     END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sun 2023-2-5  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-05-04 12:36:04