timelzayus
New member
- Joined
- Aug 7, 2010
- Messages
- 10
- Reaction score
- 0
- Points
- 0
Hi all !
I am currently writing an extension that permits to export MFDs over network.
It's working !
To do that, I need to get a HBITMAP from a SURFHANDLE. I do that with a BitBlt :
There is a big problem on that code : The BitBlt. It does not use the hardware acceleration and is VERY slow. Currently, Orbiter is not very usable with my plugin *only* because of this BitBlt.
I need another way to get a HBITMAP or a GDI+ CImage from a oapi::SURFHANDLE.
A friend and I have been searching for two days and we did not found... maybe someone could help me ?
Thank you very much.
I am currently writing an extension that permits to export MFDs over network.
It's working !
To do that, I need to get a HBITMAP from a SURFHANDLE. I do that with a BitBlt :
Code:
HDC hDCsrc = oapiGetDC(_surface);
// Copy the Device Context into a Bitmap
HDC cdc = CreateCompatibleDC(hDCsrc);
HBITMAP cbm = CreateCompatibleBitmap(hDCsrc, Width(), Height());
HBITMAP oldbm = (HBITMAP)SelectObject(cdc, cbm);
BitBlt(cdc, 0, 0, Width(), Height(), hDCsrc, 0, 0, SRCCOPY);
SelectObject(cdc, oldbm);
// Release the Surface Device Context
oapiReleaseDC(_surface, hDCsrc);
I need another way to get a HBITMAP or a GDI+ CImage from a oapi::SURFHANDLE.
A friend and I have been searching for two days and we did not found... maybe someone could help me ?
Thank you very much.