PicDC:=GetDC(MCHandle);
try
StretchDIBits(PicDC,
nDestX,nDestY,
nDestWidth,nDestHeight,
0,0,
m_pSmallInfo^.bmiHeader.biWidth,
m_pSmallInfo^.bmiHeader.biHeight,
m_pImageBuffer
m_pSmallInfo^,
DIB_RGB_COLORS,
SRCCOPY);
finally
ReleaseDC(MCHandle,PicDC);
end;
发现如果分配图象缓冲区m_pImageBuffer时,如果先分配其他缓冲区,再分配它,图象就没有显示,只有先分配它时,才能正常显示图象,这是为什么?
try
StretchDIBits(PicDC,
nDestX,nDestY,
nDestWidth,nDestHeight,
0,0,
m_pSmallInfo^.bmiHeader.biWidth,
m_pSmallInfo^.bmiHeader.biHeight,
m_pImageBuffer
m_pSmallInfo^,
DIB_RGB_COLORS,
SRCCOPY);
finally
ReleaseDC(MCHandle,PicDC);
end;
发现如果分配图象缓冲区m_pImageBuffer时,如果先分配其他缓冲区,再分配它,图象就没有显示,只有先分配它时,才能正常显示图象,这是为什么?
好像是分配height×width×3这样大的内存,直接就没有成功!
楼主,你最后是怎么解决的啊,急用,请教!
斑竹,帮个忙嘛!谢谢!