[Solved] Thumbnail Control

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
pseongho
Posts: 4
Joined: Wed Dec 18 2002

[Solved] Thumbnail Control

Post by pseongho »

I downloaded the trial version and tried to create an sample app with thumbnail control.
I created it in MFC project. When I call Initialize funciton, I can't use GetOcx() since the base class of the ActiveX wrapper class is CWnd and it doesn't have GetOcx() method.

m_pdf.Open( CString( "c:\\test.pdf"), NULL);
m_pages.Initialize( m_pdf.GetIDispatch( FALSE));

I used GetIDispatch instead, but my app crashes. Could help?
David
Amyuni Team
Posts: 89
Joined: Mon Dec 18 2006

Re: Thumbnail Control

Post by David »

Hello

For the MFC wrappers of ActiveX controls the call to make to get the ActiveX interface pointer is not GetOcx() as in C#. It is GetControlUnknown().

So this should be:

Code: Select all

m_pdf.Open( CString( "c:\\test.pdf"), NULL);
m_pages.Initialize( m_pdf.GetUnknown());

Hope that helps?

David
Amyuni Custom Development
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php
zaksoft
Posts: 66
Joined: Fri Feb 20 2004

Re: Thumbnail Control

Post by zaksoft »

Maybe this can help someone else..

m_pdf.Open( CString( "c:\\test.pdf"), NULL);

LPUNKNOWN pUnk = m_pdf.GetControlUnknown();
LPDISPATCH pDisp = NULL;
pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);
ASSERT( pDisp);

m_pages.Initialize( pDisp);

Davide...
Davide Zaccanti
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re:Thumbnail Control

Post by Joan »

It will definitely.

Thanks for posting this.

I will mark this issue as solved.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Post Reply