C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem mit Callback-Funktion bei EnumEnhMetaFile

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (German)
View previous topic :: View next topic  
Author Message
TheCompCoder
Junior Member


Joined: 03 Apr 2006
Posts: 1

PostPosted: Mon Apr 03, 2006 8:27 am    Post subject: Problem mit Callback-Funktion bei EnumEnhMetaFile Reply with quote



Versuche jetzt seit einiger Zeit die Records eines EMF´s auszulesen. Leider klappt der Aufruf der Callbackfunktion nicht. Habe vieles ausprobiert, aber es funktioniert nicht. Hat noch jemand eine Ahnung woran das liegen kann? (falsche Parameter, etc.). Ein Kurzauszug vom Quellcode:

// Callback Funktion, die angesprungen werden soll
static int CALLBACK EnhMetaFileProc (HDC hdc,
HANDLETABLE *lpht,
CONST ENHMETARECORD *lpmr,
int cObj,
LPARAM lParam)
{
CDC *pDC = (CDC *)lParam;
switch (lpmr->iType)
{
case META_SETWINDOWEXT: pDC->SetWindowExt
(lpmr->dParm[1], lpmr->dParm[0]); break;
}
....
....
return 1;
}

// Aufruf. CMetaFilePolygon ist eine Hilfsklasse die das Metafile erstellt und
// verwaltet.
static void HoleMetafile (CWnd* pWindow)
{
LPARAM *lParam;
CMetaFilePolygon MetaPolygon;
MetaPolygon.Create(NULL);
HDC myhdc = GetDC(pWindow->GetSafeHwnd());
CFile file ((LPCTSTR)"C:\\TEST1.EMF", CFile::modeRead);
MetaPolygon.Read(&file);
RECT myRect = {20,30,180,230};
HENHMETAFILE hEmf = MetaPolygon.GetMetaFileHandle();
bool ret = EnumEnhMetaFile (myhdc, hEmf, EnhMetaFileProc, lParam,
&myRect);
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.