Just try out the following.

Use CDC::StretchBlt
Code: CPP
BOOL StretchBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwRop );
to get such a combination that you can mask the image bits to display the requested of RGB. and then use CDC::MaskBlt
Code: CPP
BOOL MaskBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, CBitmap& maskBitmap, int xMask, int yMask, DWORD dwRop );
to mask the bitmap and display it to user.