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







.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top