Unfortunately, Windows bitmaps are stored from bottom to top...
I assume you have implemented some kind of loop where you copy line by line and pixel by pixel from the Windows bitmap into the XBitmap. Maybe the easiest way is to invert the line counter so that finally the bitmap is loaded in the expected order.
This makes it easier and faster than resorting the bitmap again.
One additional remark: Please consider, that the XBitmap is a platfrom-dependent bitmap - this means, that your image loader has to take care, that the color format of the Platform Package matches to your implementation.
Hope this helps...