克隆图片对象是老是提示出错,真是奇怪,相关代码如下:
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.
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.
解决方案 »
- vs2005中加载了32位的真彩色资源,
- 学习MFC中,继续散分
- SOCKET代码问题
- mssqlserver 1433端口已改成6862,客户端只安软件怎么连接不上服务器呀?
- Remote Desktop 管理不了我的远程服务器了!!急,急,急!
- 请问“硬加速显示BMP”是什么意思?
- to wuxfBrave(向一颗星杀啊,请多给分)帮忙!!
- VC,毕业论文(一万字),那位DD有时间,5月10日前完成。
- 如何得到屏幕上1像素对应打印机的点数????
- 请问:installshield打包怎么将access数据库打包进去?
- 狄仁杰--宦海浮沉,心系民生
- 弱弱的问问,MFC RIBBON 中如何为控件添加变量
http://topic.csdn.net/u/20071123/20/EC87CABE-9626-46C6-876E-2481E486BB90.html