you can try this:
CBitmap::GetBitmap(). bmWidth, bmHeight.BITMAP Structure
The BITMAP structure has the following form:typedef struct tagBITMAP {  /* bm */
    int     bmType;
    int     bmWidth;
    int     bmHeight;
    int     bmWidthBytes;
    BYTE    bmPlanes;
    BYTE    bmBitsPixel;
    LPVOID  bmBits;
} BITMAP;