求解CreateDIBSection函数的使用方法
struct BLENDFUNCTION{
public byte BlendOp;
public byte BlendFlags;
public byte SourceConstantAlpha;
public byte AlphaFormat;
}
struct BITMAPINFO
{
public BITMAPINFOHEADER bmiHeader;
public BLENDFUNCTION bmiColors;
}
struct BITMAPINFOHEADER
{
public int biSize;
public int biWidth;
public int biHeight;
public short biPlanes;
public short biBitCount;
public int biCompression;
public int biSizeImage;
public int biXPelsPerMeter;
public int biYPelsPerMeter;
public int biClrUsed;
public int biClrImportant;
}
BITMAPINFO BMI = new BITMAPINFO();
BMI.bmiHeader.biSize =40;
BMI.bmiHeader.biWidth = f_size .Width ;
BMI.bmiHeader.biHeight = f_size .Height ;
BMI.bmiHeader.biPlanes = 1;
BMI.bmiHeader.biBitCount = 32;
BMI.bmiHeader.biSizeImage = BMI.bmiHeader.biWidth * BMI.bmiHeader.biHeight * BMI.bmiHeader.biBitCount / 8;
hwnd = zhwnd;
IntPtr temp = API.GetDC(hwnd);
hdc = API.CreateCompatibleDC(temp);
API.ReleaseDC(hwnd, temp );
hDIB = API.CreateDIBSection(hdc, BMI,0,0,0,0);
到这就不能下去了。。。 在c#怎么写的呀 求函数申明 求CreateDIBSection使用方法 --------------------编程问答-------------------- 原来是缺少ref。。。没有传址 坑爹 --------------------编程问答-------------------- 现在到处都是P/Invoke啊
补充:.NET技术 , C#