void CGdiexampleDlg::OnImage() { // TODO: Add your command handler code here CClientDC dc(this); //创建Graphics对象 Graphics graphics(dc); Image image(L "d:\\1.jpg"); //在矩形区域内显示jpg图像 Point destPoints1[3] = { Point(10, 10), Point(220, 10), Point(10, 290) }; graphics.DrawImage(&image, destPoints1, 3); //在平行四边形区域内显示jpg图像 Point destPoints2[3] = { Point(230, 10), Point(440, 10), Point(270, 290) }; graphics.DrawImage(&image, destPoints2, 3); } |
![]() 图7 GDI+多种图像格式支持 |
联系客服