OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 06-12-2009, 13:08
pasha01 pasha01 is offline
Junior Member
Join Date: Dec 2009
Posts: 1
Default C++Builder6 ExportBitmap

Hi All,
My question is, I need to export the CDR to a PNG - does anyone know if a set transparent Background ?
Here's my test code...
Variant COR;
     COR = Variant::CreateObject("CorelDraw.Automation.13");
     COR.OleFunction("FileOpen", "D:\\B1-5.cdr");
     COR.OleFunction("SetDocVisible", true);
     COR.OleFunction("ConvertToBitmap",24, 0, 0, 1, 300, 1,1);
I try in Function ExportBitmap, to set transparent Background (import type library)
BSTR FileName = ::SysAllocString(L"D:\\m1.png");

Vgcore_tlb::cdrFilter Filter; Filter = cdrPNG ;
Vgcore_tlb::cdrExportRange Range; Range = cdrSelection;
Vgcore_tlb::cdrImageType ImageType; ImageType = cdrRGBColorImage;
Vgcore_tlb::cdrAntiAliasingType AntiAliasingType; AntiAliasingType = cdrNormalAntiAliasing;
VARIANT_BOOL Dithered = False;
VARIANT_BOOL Transparent = True;
VARIANT_BOOL UseColorProfile = True;
VARIANT_BOOL MaintainLayers = False;
Vgcore_tlb::cdrCompressionType Compression; Compression = cdrCompressionNone;
Vgcore_tlb::IVGStructPaletteOptions* PaletteOptions = 0;
Vgcore_tlb::ICorelExportFilter** pRet = 0;

Doc.OleFunction("ExportBitmap",FileName,Filter,Range,ImageType, 1889, 3057, 300, 300, AntiAliasingType, Dithered, Transparent, UseColorProfile, MaintainLayers, Compression, pRet);
Result... Type Mismatch...

Last edited by pasha01; 06-12-2009 at 13:24.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CorelDRAW 12 ExportBitmap MrClark CorelDRAW/Corel DESIGNER VBA 3 14-09-2005 15:15
Draw hogs access to ExportBitmap created files pbarton CorelDRAW/Corel DESIGNER VBA 1 10-07-2003 15:28

All times are GMT -5. The time now is 01:55.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com