求 DrawDibDraw在C#的用法,谁有例子
求 DrawDibDraw的用法,谁有例子,我总是返回 false
不知道哪里错了
public Rectangle SrcRect, DstRect;
IntPtr hdd; //DrawDibOpen()返回的句柄
//public Control Control;
public BITMAPINFOHEADER BITMAPINFOHEADER;
//public IntPtr Handle
//{
// get { return this.hdd; }
//}
public DrawDib()
{
this.SrcRect = this.DstRect = new Rectangle(0, 0, 160, 120);
}
public void Open(IntPtr hdc)
{
this.hdd = DrawDibOpen();
showVo s = new showVo();
BITMAPINFOHEADER = s.IniVideoRender();
bool b = DrawDibBegin(hdd, hdc, this.DstRect.Width, this.DstRect.Height, ref this.BITMAPINFOHEADER, this.SrcRect.Width, this.SrcRect.Height, 0);
}
public BITMAPINFOHEADER IniVideoRender()
{
BITMAPINFOHEADER bmi = new BITMAPINFOHEADER();
bmi.biCompression = (int)BI.BI_BITFIELDS;//压缩格式
bmi.biWidth = 320; //以像素为单位的图像宽度*
bmi.biHeight = 240; //以像素为单位的图像长度*
bmi.biPlanes = 1;
bmi.biBitCount = 24;
bmi.biXPelsPerMeter = 0;
bmi.biYPelsPerMeter = 0;
bmi.biClrUsed = 0;
bmi.biClrImportant = 0;
bmi.biSizeImage = 230400;//;57600
bmi.biSize = Marshal.SizeOf(bmi);
dd = new DrawDib();
dd.BITMAPINFOHEADER = bmi;
return bmi;
//dd.Open();
//try
//{
//}
//catch { }
}
QQ:75786749
MSN:feilixie@hotmail.com
------解决方案--------------------坐着沙发,帮你顶!
------解决方案--------------------学习一下,貌似视频好强哟
------解决方案--------------------ding
------解决方案--------------------ding