hi - i have an mfc activex control and want to save its visuals to a file. how should i do this? the graphics on the control are created through GDI+, so should i go through Graphics contents to an Image, or may be through CDC? thanx
so far i have this:
CDC* pdc = GetDC();
RECT rect;
GetClientRect(&rect);
Graphics graphics(pdc->GetSafeHdc());
Bitmap bitmap(rect.right -
rect.left, rect.bottom -
rect.top, &graphics);
CLSID pngClsid;
GetEncoderClsid(L"image/jpeg", &pngClsid);
bitmap.Save(fineName, &pngClsid, NULL);
but it just outputs a black screen, which is understandable
so far i have this:
CDC* pdc = GetDC();
RECT rect;
GetClientRect(&rect);
Graphics graphics(pdc->GetSafeHdc());
Bitmap bitmap(rect.right -
rect.left, rect.bottom -
rect.top, &graphics);
CLSID pngClsid;
GetEncoderClsid(L"image/jpeg", &pngClsid);
bitmap.Save(fineName, &pngClsid, NULL);
but it just outputs a black screen, which is understandable