GraphPageBase::GetPicture

Description

Get picture holder from GraphPage or LayoutPage.

Syntax

bool GetPicture( PictureHolder & phDest, LPCSTR lpcszType, int nRes, int nSpark, DWORD dwOptions )

Parameters

phDest
[output]the holder to put the image into.
lpcszType
the image type:
"Bitmap" // (Bitmap)
"EMF" // (Enhanced MetaFile, default)
"W" // (Windows Metafile)
"DIB" // (Device independent bitmap
nRes
additional info, like the resolution if bitmap.
nSpark
If >= 0, it is the index of the dataplot. If GPGETPICT_SPARKLINE_STYLE. Otherwise it should do all the dataplots and, if GPGETPICT_SPARKLINE_STYLE,
dwOptions
possible values (may combine):
EMBEDGRAPH_HIDE_AXES = 0x00000100, // hides Axes
EMBEDGRAPH_HIDE_LEGENDS = 0x00000200, // hides legends
EMBEDGRAPH_HIDE_SPECTRUMS = 0x00000400, // hides spectrums
EMBEDGRAPH_HIDE_TEXT_OBJS = 0x00000800, // hides texts
EMBEDGRAPH_SPARKLINE_LARGE = 0x00004000, // the copy in clipboard is larger than default
EMBEDGRAPH_SPARKLINE_CLIPBOARD = 0x00008000, // put a copy onto clipboard
EMBEDGRAPH_CACHE_IN_PAGE = 0x00100000, // cache image in page

Return

TRUE if succeed; FALSE otherwise

Examples

EX1

void GraphPageBase_GetPicture_Ex1()
{
        GraphPage gp;
        gp.Create("origin");
        
        PictureHolder phDst;
        gp.GetPicture(phDst, "EMF", 72, -1, EMBEDGRAPH_HIDE_LEGENDS); // can display picutre holder on dialog by PictureControl::SetPicture
}

Remark

See Also

header to Include

origin.h