Jump to content
Software FX Community

Re: GetPicture

Software FX

Recommended Posts

You can use the GetPicture method whether the chart is visible or not, the

chart must however have a size.

If you are using the DLL, you need to call CreateWnd before calling

GetPicture to give the chart a size, the window doesn't need to be visible.

To get a picture from the chart without creating a window (using the DLL),

you need to use the Paint method and draw to your own HDC containing a


Here is how, using the <#B>Paint method<#/B> you can obtain an image of the

chart without ever creating a window for it.

HDC hScreenDC, hMemDC;

HBITMAP hBmp,hOldBmp;

RECT rc;


hScreenDC = GetDC(NULL);

hMemDC = CreateCompatibleDC(hScreenDC);

hBmp = CreateCompatibleBitmap(hScreenDC,rc.right,rc.bottom);

hOldBmp = (HBITMAP) SelectObject(hMemDC,hBmp);

// Draws the chart into memory (Bitmap)


// ******************

// At this point, hBmp contains an image of the chart. Add your code that

stores or process this image HERE !

// ******************







"Jeff Weger" <jweger@vetronix.com> wrote in message


> Does anyone know how to use the method GetPicture when the graph is not

> visible?

> Thanks.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...