CBitamp and BYTE pointer - Programmer

This is a discussion on CBitamp and BYTE pointer - Programmer ; Hi, if I've a CBitmap How can get a pointer to its bytes? Thanks -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG...

+ Reply to Thread
Results 1 to 2 of 2

Thread: CBitamp and BYTE pointer

  1. CBitamp and BYTE pointer

    Hi,
    if I've a CBitmap
    How can get a pointer to its bytes?

    Thanks



    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

  2. Re: CBitmap and BYTE pointer

    "Ferdi Nando" wrote in message news:...
    > Hi,
    > if I've a CBitmap
    > How can get a pointer to its bytes?
    >
    > Thanks


    Hi,
    I'm not familiar with CBitmap, but I think that CBitmap::GetBitmap is
    what you want. It fills a BITMAP structure defined as follows :

    typedef struct tagBITMAP { /* bm */
    int bmType;
    int bmWidth;
    int bmHeight;
    int bmWidthBytes;
    BYTE bmPlanes;
    BYTE bmBitsPixel;
    LPVOID bmBits;
    } BITMAP;

    Visual Studio gives us information about the "bmBits" parameter :

    "Points to the location of the bit values for the bitmap. The bmBits
    member must be a long pointer to an array of 1-byte values."

    Hope it's what you were looking for.

    Have a nice day.

    Luis MENINA

+ Reply to Thread