克隆图片对象是老是提示出错,真是奇怪,相关代码如下:
RectF rect1 = RectF(2, 2, 5, 5);
Bitmap* pBitmap = m_pBitmap->Clone(rect1, PixelFormatDontCare);
换成
Bitmap* pBitmap = m_pBitmap->Clone(rect1, m_pBitmap->GetPixelFormat());

Bitmap* pBitmap = m_pBitmap->Clone(rect1, PixelFormat24bppRGB);
Bitmap* pBitmap = m_pBitmap->Clone(rect1, PixelFormat32bppRGB);
都出错,错误信息如下:
'TestConvertToVC.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', Cannot find or open the PDB file
'TestConvertToVC.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll', Cannot find or open the PDB file
Heap corruption detected at 01440B10
HEAP[TestConvertToVC.exe]: HEAP: Free Heap block 1440b08 modified at 1440b18 after it was freed
Windows has triggered a breakpoint in TestConvertToVC.exe.This may be due to a corruption of the heap, which indicates a bug in TestConvertToVC.exe or any of the DLLs it has loaded.This may also be due to the user pressing F12 while TestConvertToVC.exe has focus.The output window may have more diagnostic information.