Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 01-02-2015
Avatar de aguml
aguml aguml is offline
Miembro
 
Registrado: may 2013
Posts: 885
Poder: 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(afAllItems, False, True)
 
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(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;&#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 19:46:31.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Portapapeles TImage cmm07 Varios 5 06-02-2009 18:01:06
Copiar al portapapeles johurgi Varios 4 22-11-2006 20:47:48
Monitorizar el portapapeles de windows rsantosr API de Windows 3 26-09-2005 08:29:38
Portapapeles... Perio Varios 3 29-07-2005 17:27:41
StringGrid -> Portapapeles acertij022 OOP 3 17-10-2003 18:14:16


La franja horaria es GMT +2. Ahora son las 16:22:28.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi