Skip navigation
Currently Being Moderated

Picture preview control

Jun 25, 2012 2:06 PM

Tags: #cs4

I'm beginner in AI SDK, and can't find any control to draw image at ADM dialog.

All I need is just render a picture from png or jpeg file or from memory on a top half of ADM dialog and CS4 SDK.

I suppose I have to use IADMDrawer, ADMImageSuite...

Or what is the best?

 

Thanks beforehand.

 
Replies
  • Currently Being Moderated
    Jun 26, 2012 8:20 AM   in reply to Fonarix

    If you just want something that displays an image, create the control with kADMPictureStaticType. Then you can use IADMItem::SetPictureID() to specify a resource ID to display.

     

    If you need something more complicated, inherit from IADMItem and override the Draw() method. You use the IADMDrawer that method provides to draw an ADMImageRef (and you specify where). If you can use static images, you're better off (you can cache the ADMImageRef handles and draw them when you want them). An ADMImageRef you'll have to build yourself (with SetPixel, see ADMImage.h) but if you have PNG & JPGs you want to use, I think ADMIcon.h has loading functions you can use to pull them from resource files. IADMDrawer should be able to render them as well.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points