fix compile error by reordering some struct, and fix CopyFromMemory para...

...meter

The order was wrong. A class may inherits an undefined class. Then compile failed.
The 2nd parameter of ID2D1Bitmap::CopyFromMemory is "const void*" not "void*". See http://msdn.microsoft.com/zh-cn/library/dd371155(v=VS.85).aspx