Por favor, que algun administrador elimine la respuesta anterior ya que el formato no está bien. Aqui lo pongo bien:
Amigos, si hago esto:
Código PHP:
IPictureDisp *pIPD = AddFlow1->ExportPicture(afAllItems, true, true);
Me da este error al compilar:
Código:
[C++ Error] Main.cpp(731): E2034 Cannot convert 'IPictureDisp * *' to 'IPictureDisp *'
La ayuda del componente no da mucha ayuda ya que casi todo el soporte lo da para VB y en algun que otro caso pone algun ejemplo en C++. Aqui los tres ejemplos que pone para ese metodo en VB:
Example 1 (VB)
Código:
' Export the diagram to a picture box:
' here, we copy only the selected items.
Picture1.Picture = AddFlow1.ExportPicture(afSelectedItems, False, False)
Example 2 (VB)
Código:
' Copy the diagram to the clipboard:
' here we wish to copy all items and the back picture.
Clipboard.Clear
Clipboard.SetData AddFlow1.ExportPicture(afAllItems, False, True)
Example 3 (VB)
Código:
' Save the diagram in a file:
' here we don›t want to save the grid.
Dim pic As IpictureDisp
AddFlow1.ShowGrid = False
Set pic = AddFlow1.ExportPicture(afAllItems, True, True)
AddFlow1.ShowGrid = True
SavePicture pic, "myfile.emf"
Traceando puedo ver que ExportPicture se declara asi:
Código PHP:
IPictureDisp** __fastcall TAddFlow::ExportPicture(Addflow5lib_tlb::ItemSetConstants ItemSet,
VARIANT_BOOL IncludeBackColor,
VARIANT_BOOL IncludeBackPic)
{
return GetDefaultInterface()->ExportPicture(ItemSet, IncludeBackColor, IncludeBackPic)
}
Si entro con F7 llego aqui:
Código PHP:
IPictureDisp** __fastcall ExportPicture(Addflow5lib_tlb::ItemSetConstants ItemSet,
VARIANT_BOOL IncludeBackColor,
VARIANT_BOOL IncludeBackPic)
{
_TDispID _dispid(/* ExportPicture */ DISPID(134));
TAutoArgs<3> _args;
_args[1] = (int)ItemSet /*[VT_USERDEFINED:0]*/;
_args[2] = IncludeBackColor /*[VT_BOOL:0]*/;
_args[3] = IncludeBackPic /*[VT_BOOL:0]*/;
OleFunction(_dispid, _args);
return (IPictureDisp** /*[C1]*/)(LPDISPATCH) /*[VT_DISPATCH:1]*/_args.GetRetVariant();
}
He traceado por dentro y no veo que en ningun sitio llame a Release() y ya no se que mas puedo probar.