当要显示一张带边框的图片室,怎样做到只拉伸图片的内部区域,而不拉伸图片的边框宽度。
向各位求教。
[解决办法]
StretchBlt(dstDC, 0, 0,
newWidth, newHeight,
m_hDC,
0, 0,// + 边宽
m_BI.bmiHeader.biWidth,//-2*边宽
m_BI.bmiHeader.biHeight,//-2*边宽SRCCOPY))
[解决办法]
m_hDC选择图片;
先BitBlt()绘制完整图片;
然后
StretchBlt(dstDC, 0, 0, //+边宽
newWidth, newHeight, //-2*边宽
m_hDC,
0, 0,// + 边宽
m_BI.bmiHeader.biWidth,//-2*边宽
m_BI.bmiHeader.biHeight,//-2*边宽
SRCCOPY))