使用VC++2005,代码如下:void OnPaint(HDC) {
    CPaintDC dc(m_hWnd);
    Image *img=images.GetImage(0);
    Graphics gp(dc);
    gp.Clear(Color::Black);
    ColorMatrix cm={{
        {1.0,0,0,0,0},
        {0,1.0,0,0,0},
        {0,0,1.0,0,0},
        {0,0,0,0.5,0},
        {0,0,0,0,1.0}
    }};
    ImageAttributes ImgAttr;
    ImgAttr.SetColorMatrix(&cm);
    gp.DrawImage(img,
                 Rect(10,10,100,100),
                 0,0,img->GetWidth(),img->GetHeight(),
                 UnitPixel,&ImgAttr
                );
}编译的时候无错误无警告。其余的图可以画出来(在这段代码之后调用DrawImage可以画普通的图),但就是上面的半透明的图画不出来。经Debug的时候中断程序检查,Img,ImgAttr的状态都是OK,但是gp的状态是OutOfMemory,这是怎么回事?