🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #610

DLL's and Metafiles and GIF's (Was: 236 Color GIF ... ...)

#610
From: In Sik Rhee
Date: Wed, 07 Nov 1990 22:45
32 lines
2051 bytes
Ok folks, what am I doing wrong?  My import filter (which follows
the specs standardized by PageMaker) works.  Its job is to take 
a GIF and convert it to a DIB and then stretching it into a Metafile.
it returns the handle to the metafile.  I have several questions regarding
procedures with metafiles.

1.  the Palette:  when I have created the logical palette, do I select
	it with the metafile handle, or do I do a GetDC(hMetafile)
	then select and realize to this hDC before restoring the DC?
	the way I have it now, I am selecting and realizing the palette
	to the handle of the metafile.

2.  GetMetaFileBits and Set(select?)MetaFileBits...   right now , I am
	calling these after I've finished everything...  is that right?
	hmf = GetMetaFileBits(hmf);
	return (SetMetaFileBits(hmf));

3.  Is there any procedure I am overlooking when I play with the palette
	and make my metafile?   

The problem does not manifest when I call my filter from an application
that will just Play the metafile.  The problem occurs when I am using
Word for Windows or Power Point to import an image... Actually, with
Word, it did import an image, but the success was short-lived, since it
proceeded to crash when I played with the document and menus

4.  Are there any garbage collections that I'm forgetting to do?
	I free all my global allocations (including the palette)
	and the only thing that gets passed out is the handle to the
	Metafile...  

All help/suggestions/comments is appreciated...
Technical Details
Message-ID: <1990Nov7.224545.16164@agate.berkeley.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!e260-1g!c60c-3fz

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!e260-1g!c60c-3fz
From: c60c-3fz@e260-1g.berkeley.edu (In Sik Rhee)
Newsgroups: comp.windows.ms.programmer
Subject: DLL's and Metafiles and GIF's (Was: 236 Color GIF ... ...)
Summary: Filter causes windows crash!
Keywords: GIF BMP METAFILE VGA
Message-ID: <1990Nov7.224545.16164@agate.berkeley.edu>
Date: 7 Nov 90 22:45:45 GMT
Sender: usenet@agate.berkeley.edu (USENET Administrator)
Organization: University of California, Berkeley
Lines: 32