fix some compiler warnings
This commit is contained in:
parent
1cf1021185
commit
ad8a799c18
|
@ -116,17 +116,19 @@ namespace paperangapp {
|
||||||
bmi.cols=new uint[256];
|
bmi.cols=new uint[256];
|
||||||
bmi.cols[0]=MAKERGB(0, 0, 0);
|
bmi.cols[0]=MAKERGB(0, 0, 0);
|
||||||
bmi.cols[1]=MAKERGB(255, 255, 255);
|
bmi.cols[1]=MAKERGB(255, 255, 255);
|
||||||
IntPtr hbm0 = CreateDIBSection(IntPtr.Zero,ref bmi,DIB_RGB_COLORS,out IntPtr _,IntPtr.Zero,0);
|
IntPtr hbm0 = CreateDIBSection(IntPtr.Zero,ref bmi,DIB_RGB_COLORS,out _,IntPtr.Zero,0);
|
||||||
IntPtr sdc = GetDC(IntPtr.Zero);
|
IntPtr sdc = GetDC(IntPtr.Zero);
|
||||||
IntPtr hdc = CreateCompatibleDC(sdc); SelectObject(hdc, hbm);
|
IntPtr hdc = CreateCompatibleDC(sdc);
|
||||||
IntPtr hdc0 = CreateCompatibleDC(sdc); SelectObject(hdc0, hbm0);
|
_ = SelectObject(hdc, hbm);
|
||||||
BitBlt(hdc0, 0, 0, w, h, hdc, 0, 0, SRCCOPY);
|
IntPtr hdc0 = CreateCompatibleDC(sdc);
|
||||||
|
_ = SelectObject(hdc0, hbm0);
|
||||||
|
_ = BitBlt(hdc0, 0, 0, w, h, hdc, 0, 0, SRCCOPY);
|
||||||
Bitmap b0 = Image.FromHbitmap(hbm0);
|
Bitmap b0 = Image.FromHbitmap(hbm0);
|
||||||
DeleteDC(hdc);
|
_ = DeleteDC(hdc);
|
||||||
DeleteDC(hdc0);
|
_ = DeleteDC(hdc0);
|
||||||
ReleaseDC(IntPtr.Zero, sdc);
|
_ = ReleaseDC(IntPtr.Zero, sdc);
|
||||||
DeleteObject(hbm);
|
_ = DeleteObject(hbm);
|
||||||
DeleteObject(hbm0);
|
_ = DeleteObject(hbm0);
|
||||||
return b0;
|
return b0;
|
||||||
}
|
}
|
||||||
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
|
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
|
||||||
|
|
Loading…
Reference in New Issue