Canvas & Bitblt

Hello All,

I have some problems with bitblt'ing bitmaps into a canvas... It works
always with small bitmaps, once the bitmap becomes larger than 300 pixels,
sometimes It updates well the control, sometimes not.

Typically the first time I call the function is does not update my control
even when calling all updates, repaint, invalidate functions I know...
Second time it works always.

Typically how it works

1. I get the handle of the Canvas
2. I create a compatible bitmap of the size of my original picture with the
CreateBitmap function
    and a compatible DC from the handle of the Canvas
3. I update a bitmap header structure that defines my original pictures
(always 32 bits)
4. I use the SetDIBits function to store my original pixel values into the
compatible bitmap
5.I use the  bitblt function to move from the compatible device to the final
device context.

Any idea of what I can do ?