![]() |
Picture








Public Data Item |
Declared in: NiImage.h |
Declaration
CNiPicture Picture;
Description
Specifies the image used in the CNiImage object.
This property does not apply to CNiImage objects representing captions.
Note that you must initialize a CNiPicture object from an existing object. For example:
CNiPicture picture = image.Picture; picture.Type = CNiPicture::Bitmap;
If you do not initialize a CNiPicture object from an existing object, a CNiObjectNotInUsableState exception will be thrown when you attempt to manipulate the instance of the CNiPicture. For example:
CNiPicture picture;// This will throw a CNiObjectNotInUsableState exception because // the CNiPicture object was not initialized from an existing // object. picture.Type = CNiPicture::Bitmap;
CNiPicture wraps an IPictureDisp pointer, which cannot be marshalled across threads. This limitation prevents you from accessing CNiPicture objects from threads other than the thread that created the CNiPicture object. Refer to Microsoft Knowledge Base article Q150034 for more information.