question for programmers

  • Thread starter Thread starter Yana
  • Start date Start date
Y

Yana

hi,
I'm trying to add image to my PowerPoint presentation
from c++ application.
When I have right Shape object, how to create and add
Image?

thanks,
Yana
 
Something like this:

// The height and width are just place holders. We have to set the
scale height and width after inserting
// the picture.
pLogoShape =
pCurrentSlide->Shapes->AddPicture(logoPath.AllocSysString(),
Office::msoFalse,
Office::msoTrue,left, top, 10, 10);

// Lock the aspect ratio
pLogoShape->PutLockAspectRatio(Office::msoTrue);

// set the scale height and width relative to original picture size.
pLogoShape->ScaleHeight( 1, Office::msoTrue,
Office::msoScaleFromTopLeft);
pLogoShape->ScaleWidth( 1, Office::msoTrue,
Office::msoScaleFromTopLeft);
 
Thanks Mike!
-----Original Message-----
Something like this:

// The height and width are just place holders. We have to set the
scale height and width after inserting
// the picture.
pLogoShape =
pCurrentSlide->Shapes->AddPicture(logoPath.AllocSysString (),
Office::msoFalse,
Office::msoTrue,left, top, 10, 10);

// Lock the aspect ratio
pLogoShape->PutLockAspectRatio(Office::msoTrue);

// set the scale height and width relative to original picture size.
pLogoShape->ScaleHeight( 1, Office::msoTrue,
Office::msoScaleFromTopLeft);
pLogoShape->ScaleWidth( 1, Office::msoTrue,
Office::msoScaleFromTopLeft);







.
 
Back
Top