This does not agree with MSDN's description of the function. According to MSDN, InitializeFromBitmap should compute a palette based on the contents of the (presumably) non-paletted bitmap data.