Problem importing OCX into C++Builder (Delphi)

Discussions about document viewing.
Post Reply
bitberry
Posts: 3
Joined: Tue Jul 06, 2010 12:06 pm

Problem importing OCX into C++Builder (Delphi)

Post by bitberry » Tue Jul 06, 2010 12:17 pm

Hi,

I'm trying to evaludate GdViewer Pro, but I am having problems importing the OCX into C++Builder. It doesn't generate the wrapper packages properly, presumably because the OCX objects are missing a "CanCreate" flag. This is what the generated header file says:

Code: Select all

namespace Gdviewerpro4_tlb
{

// *********************************************************************//
// HelpString: GdViewer Pro 4 - Image Viewer ActiveX
// Version:    1.13
// *********************************************************************//

// SKIPPING COCLASS: dummy                - Lacks 'CanCreate' flag
// SKIPPING COCLASS: GdViewer             - Lacks 'CanCreate' flag
// SKIPPING COCLASS: GdViewerCnt          - Lacks 'CanCreate' flag
};  
The GdViewerpro4.ocx has version number 4.12.0.11, dated May 27, 2010.

Please help!

bitberry
Posts: 3
Joined: Tue Jul 06, 2010 12:06 pm

Re: Problem importing OCX into C++Builder (Delphi)

Post by bitberry » Tue Jul 06, 2010 1:52 pm

Found a workaround.

Tools -> Options -> C++ Options -> Type Library. Under "Ignore special CoClass Flags when importing", enable "Can Create".

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Problem importing OCX into C++Builder (Delphi)

Post by Loïc » Tue Jul 06, 2010 2:29 pm

Thank you for the tip !

Another workaround consists to import Type Library shipped with the SDK ;)

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest