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

Search Results for "CreateDIBSection" in [All]

gdi32

.
Summary
The CreateDIBSection function creates a Device Independent Bitmap (DIB) that applications can write to directly. The function gives you a pointer to the location of the bitmap bit values. You can supply a handle to a file-mapping object that the function will use to create the bitmap, or you can let the system allocate the memory for the bitmap.
.

static extern IntPtr CreateDIBSection(IntPtr hdc, [In] ref BITMAPINFO pbmi,

.

  Private Shared Function CreateDIBSection(ByVal hdc As Int32, _

.

hSection is a handle to a file mapping object that the function will use to create the DIB and can be NULL. If hSection is not NULL, it must be a handle to a file mapping object created by calling the CreateFileMapping function (otherwise CreateDIBSection will fail). Moreover, the CreateDIBSection function will locate the bitmap’s bit values at offset dwOffset in the file mapping object referred to by hSection. An application can retrieve the hSection handle by calling the GetObject function with the HBITMAP returned by CreateDIBSection.

.

If hSection is NULL, the O/S will allocate memory for the DIB (CreateDIBSection will ignore the dwOffset parameter). An application cannot later obtain a handle to this memory: the dshSection member of the DIBSECTION structure will be NULL.

.
Documentation
[CreateDIBSection] on MSDN

Constants

2: LR_
.

    public const int LR_CREATEDIBSECTION = 0x2000;

.

    LR_CREATEDIBSECTION = &H2000


 
Access PInvoke.net directly from VS: