Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

BITMAP (Structures)
 
.
Summary
The BITMAP structure defines the type, width, height, color format, and bit values of a bitmap.
Summary
defines the type, width, height, color format, and bit values of a bitmap.

C# Definition:

using System;
using System.Runtime.InteropServices;
    [StructLayout(LayoutKind.Sequential)]
    public struct BITMAP
    {
        public int bmType;
        public int bmWidth;
        public int bmHeight;
        public int bmWidthBytes;
        public ushort bmPlanes;
        public ushort bmBitsPixel;
        public IntPtr bmBits;
    }

VB Definition:

Public Structure BITMAP
     Public bmType As Int32
     Public bmWidth As Int32
     Public bmHeight As Int32
     Public bmWidthBytes As Int32
     Public bmPlanes As Int16
     Public bmBitsPixel As Int16
     Public bmBits as IntPtr
End Structure

/// <summary>
/// The BITMAP structure defines the type, width, height, color format, and bit values of a bitmap.
/// </summary>
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct BITMAP
{
     /// <summary>
     /// The bitmap type. This member must be zero.
     /// </summary>
     public int bmType;

     /// <summary>
     /// The width, in pixels, of the bitmap. The width must be greater than zero.
     /// </summary>
     public int bmWidth;

     /// <summary>
     /// The height, in pixels, of the bitmap. The height must be greater than zero.
     /// </summary>
     public int bmHeight;

     /// <summary>
     /// The number of bytes in each scan line. This value must be divisible by 2, because the system assumes that the bit
     /// values of a bitmap form an array that is word aligned.
     /// </summary>
     public int bmWidthBytes;

     /// <summary>
     /// The count of color planes.
     /// </summary>
     public int bmPlanes;

     /// <summary>
     /// The number of bits required to indicate the color of a pixel.
     /// </summary>
     public int bmBitsPixel;

     /// <summary>
     /// A pointer to the location of the bit values for the bitmap. The bmBits member must be a pointer to an array of
     /// character (1-byte) values.
     /// </summary>
     public IntPtr bmBits;
}

User-Defined Field Types:

None.

Notes:

None.

None

Documentation
Documentation

http://msdn.microsoft.com/en-us/library/dd183376

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions