Link to home
Start Free TrialLog in
Avatar of pcs071997
pcs071997

asked on

HDC converting

Hello....I want to convert HDC -> memory block (memory pointer)
because my program used RPC function on win95.
I need to transfer DC. but I can't use that User-marshalling on win95.
therefore i need to convert HDC -> memory block.
I used this method.
HDC -> Metafile -> memory pointer

-------------------------------------------------

srcDC = CreateEnhMetaFile(hDC, NULL, NULL, NULL);
BitBlt(srcDC, 0, 0, rect->right, rect->bottom, hDC, 0, 0, SRCCOPY);
hMetaFile = CloseEnhMetaFile(srcDC);
nSize = GetEnhMetaFileBits(hMetaFile, 0, NULL);
lpMem = (LPBYTE) GlobalAlloc(GPTR, nSize);
GetEnhMetaFileBits(hMetaFile, nSize, lpMem);

---------------------------------------------------

but very slow!!!
how can i use better method than metafile !!!
thank you!!!

ASKER CERTIFIED SOLUTION
Avatar of jaba
jaba

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial