Ver Mensaje Individual
  #4  
Antiguo 01-02-2015
Avatar de aguml
aguml aguml is offline
Miembro
 
Registrado: may 2013
Posts: 885
Reputación: 14
aguml Va por buen camino
Amigo, si hago esto:

IPictureDisp *pIPD = AddFlow1->ExportPicture(afAllItems, true, true);

Me da este error al compilar:

[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:

Export the diagram to a picture box:

Código PHP:
' here, we copy only the selected items.

Picture1.Picture = AddFlow1.ExportPicture(afSelectedItems, False, False)
 

Example 2 (VB)


Código PHP:
' Copy the diagram to the clipboard:

here we wish to copy all items and the back picture.

Clipboard.Clear

Clipboard.SetData AddFlow1.ExportPicture(afAllItemsFalseTrue)
 
Example 3 (VB)


Código PHP:
' 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(afAllItemsTrueTrue) 

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(ItemSetIncludeBackColorIncludeBackPic);




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;&#8233;
 
_args[1] = (int)ItemSet /*[VT_USERDEFINED:0]*/;&#8233;
 
_args[2] = IncludeBackColor /*[VT_BOOL:0]*/;&#8233;
 
_args[3] = IncludeBackPic /*[VT_BOOL:0]*/;&#8233;
 
OleFunction(_dispid_args);&#8233;
 
return (IPictureDisp** /*[C1]*/)(LPDISPATCH/*[VT_DISPATCH:1]*/_args.GetRetVariant();
}&
#8233; 
He traceado por dentro y no veo que en ningun sitio llame a Release() y ya no se que mas puedo probar. 


Última edición por aguml fecha: 01-02-2015 a las 18:46:31.
Responder Con Cita