Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than gdi32, prefix the name with the module name and a period.
BitBlt (gdi32)
.
C# Signature:
[DllImport("gdi32.dll")]
static extern bool BitBlt(IntPtr hdc, int nXDest, int nYDest, int nWidth,
int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, uint dwRop);
The last argument uint dwRop from the signature above specifies a raster operation code defined in the header. A value from enum TernaryRasterOperations can be used as the last argument to fake the defined value as seen in this signature:
[DllImport("gdi32.dll")]
public static extern bool BitBlt(IntPtr hObject, int nXDest, int nYDest, int nWidth,
int nHeight, IntPtr hObjSource, int nXSrc, int nYSrc, TernaryRasterOperations dwRop);
VB Signature:
Declare Function BitBlt Lib "gdi32.dll" (
ByVal hdcDest As IntPtr, _
ByVal nXDest As Int32, _
ByVal nYDest As Int32, _
ByVal nWidth As Int32, _
ByVal nHeight As Int32, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Int32, _
ByVal nYSrc As Int32, _
ByVal dwRop As Int32) As Boolean
The following code can be used to replace Graphics.DrawImage(). BitBlt is many times faster than DrawImage() however Bitmap.GetHbitmap slows down this operation.
[DllImport("gdi32.dll")]
public static extern bool BitBlt(IntPtr hObject, int nXDest, int nYDest, int nWidth,
int nHeight, IntPtr hObjSource, int nXSrc, int nYSrc, TernaryRasterOperations dwRop);
Used by [BitBlt] to define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color.
5/26/2010 2:34:39 PM - -67.168.202.202
Used by [BitBlt] to define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color.
5/26/2010 2:34:39 PM - -67.168.202.202
Click to read this page
10/21/2013 6:37:27 PM - -217.105.222.30
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).