CPictureEX类的一个扩展或修改(图片的放大与缩小)
1 在CPictureEx::OnPaint() 函数中 2 将下面代码: 3 ::BitBlt(dc.m_hDC, 0, 0, nPaintWidth, nPaintHeight, m_hMemDC, m_PaintRect.left, m_PaintRect.top, SRCCOPY); 4 5 替换为: 6 7 SIZE size = GetSize(); 8 9 ::StretchBlt(dc.m_hDC,0,0,(int)(size.cx*0.5),(int)(size.cy*0.5),m_hMemDC,0,0,size.cx,size.cy,SRCCOPY);