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(hMetaFi le, 0, NULL);
lpMem = (LPBYTE) GlobalAlloc(GPTR, nSize);
GetEnhMetaFileBits(hMetaFi le, nSize, lpMem);
-------------------------- ---------- ---------- -----
but very slow!!!
how can i use better method than metafile !!!
thank you!!!
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(hMetaFi
lpMem = (LPBYTE) GlobalAlloc(GPTR, nSize);
GetEnhMetaFileBits(hMetaFi
--------------------------
but very slow!!!
how can i use better method than metafile !!!
thank you!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.