GdViewer and COM

Discussions about document viewing.
Post Reply
DavideBak
Posts: 11
Joined: Fri Aug 10, 2012 12:05 pm

GdViewer and COM

Post by DavideBak » Tue Sep 18, 2012 12:41 pm

Hello,
i've to show a file preview in a mfc program.

Code: Select all

if(IsGdPictureRegistered())
	{
 _GdViewer** pEditor;
		CAxWindow GdViewer;
		GdPictureStatus status;
		GdViewer.Attach(hWnd);    // hWnd = GetDlgItem(IDC_GDVIEWER);
		HRESULT hr=GdViewer.QueryControl(&pEditor);
		if (SUCCEEDED(hr))
		{
			if(GdPictureViewer_CreateObject(pEditor) == S_OK)
				status = (*pEditor)->DisplayFromFile("C:\\Users\\pippo.pdf");
		}
	}
this code is call into InitDialog from a dialog with a gdviewer control.
It failed always the QueryControl.
I don't know if i use the correct way to bind the control with the gdViewer.


thank's in advance
Davide

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: GdViewer and COM

Post by Gabriela » Fri Apr 12, 2019 2:36 pm

Hi,

pretty old thread :) but here is our tutorial for COM edition:
https://www.gdpicture.com/guides/gdpicture/web ... iveX).html

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest