16,471
社区成员
发帖
与我相关
我的任务
分享
BOOL CGdiPlusHelper::SaveImage( HDC &hDC )
{
CString strFilters = _T("Protable Network Graphics (*.png)|*.png|Joint Photographic Experts Group (*.jpg)|*.jpg|Graphics Interchange Format (*.gif)|*.gif|Bitmap file (*.bmp)|*.bmp||");
CFileDialog dlg( FALSE, _T("png"), _T("hi"), OFN_OVERWRITEPROMPT, strFilters );
Graphics graphic( hDC );
Bitmap image(800, 600, &graphic);
// 如何将SaveImage函数传过来的hDC中的内容绘制到image中?
iamge.Save(...);
}