首页
社区
课程
招聘
[求助]API函数SelectObject
发表于: 2009-11-9 10:13 4164

[求助]API函数SelectObject

2009-11-9 10:13
4164
我在看某个程序代码,因为以前没有接触过SelectObject这个API,所以想了解一下这个函数,啊能用VB6.0给我举个例子?

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 347
活跃值: (10)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
2
给你个例子:

public UserControl1()
{
InitializeComponent();
this.bitmap1 = new Bitmap(@"C:\aaa.bmp");
this.dc1 = this.CreateGraphics();
this.dc2 = this.CreateGraphics();
}
Bitmap bitmap1 = null;
Graphics dc1;
Graphics dc2;
protected override void OnPaint(PaintEventArgs e)
{
this.Draw();
base.OnPaint(e);
}
private void Draw()
{
if (bitmap1 != null)
{
int i = GDI32.SelectObject((int)this.dc1.GetHdc(), (int)this.bitmap1.GetHbitmap());
this.dc1.ReleaseHdc();
GDI32.BitBlt((int)dc2.GetHdc(), 0, 0, this.bitmap1.Width, this.bitmap1.Height, (int)this.dc1.GetHdc(), 0, 0, 13369376);
this.dc1.ReleaseHdc(); this.dc2.ReleaseHdc();
}
}

So .. i = 0... this meens  that the bitmap isn't in dc1...
2009-11-9 10:49
0
雪    币: 26
活跃值: (25)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
3
VB6.0的代码有吗?
2009-11-9 14:11
0
游客
登录 | 注册 方可回帖
返回
//