谁能给一StretchBlt函数的例子

grievefish 2000-02-29 07:00:00
QUAKE3问题VENNE答的很好!
但有个例子就更好了!
谁能提供一个StretchBlt函数的例子。在下不胜感激!
...全文
325 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Un1 2000-02-29
  • 打赏
  • 举报
回复
别客气!
grievefish 2000-02-29
  • 打赏
  • 举报
回复
谢谢UN1!!
Un1 2000-02-29
  • 打赏
  • 举报
回复
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5355
ClientLeft = 1560
ClientTop = 1920
ClientWidth = 6420
LinkTopic = "Form1"
ScaleHeight = 5355
ScaleWidth = 6420
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 765
Left = 1920
TabIndex = 2
Top = 4230
Width = 2685
End
Begin VB.PictureBox Picture2
Height = 1125
Left = 1380
ScaleHeight = 1065
ScaleWidth = 2745
TabIndex = 1
Top = 2580
Width = 2805
End
Begin VB.PictureBox Picture1
Height = 1005
Left = 1440
ScaleHeight = 945
ScaleWidth = 2625
TabIndex = 0
Top = 750
Width = 2685
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Const SRCCOPY = &HCC0020

Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long

Private Sub Command1_Click()
Dim lw As Long
lw = Picture1.Picture.Width

Dim lh As Long
lh = Picture1.Picture.Height

MsgBox StretchBlt(Picture2.hdc, 0, 0, lw, lh, Picture1.hdc, 0, 0, lw, lh, SRCCOPY)
End Sub

Private Sub Form_Load()
Set Picture1 = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Bitmaps\Assorted\Beany.bmp")
End Sub

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧