I am running Visual C++ 2005 and I'm having some trouble with GDI+.
I have two bitmaps:
Expand|Select|Wrap|Line Numbers
- Bitmap* pngFrame;
- Bitmap* pngEmblem;
Expand|Select|Wrap|Line Numbers
- PAINTSTRUCT ps;
- BeginPaint(hwnd, &ps);
- Gdiplus::Graphics* gfx = new Gdiplus::Graphics(ps.hdc);
- gfx->DrawImage(pngFrame, 80, 12);
- gfx->DrawImage(pngEmblem, 80 + ((17 - (INT)pngEmblem->GetWidth()) / 2), 12 + ((17 - (INT)pngEmblem->GetHeight()) / 2));
- delete gfx;
- EndPaint(hwnd, &ps);
Now, that works all fine and dandy. However, in another event, when the user clicks a button. I would like to draw the pngFrame, draw the pngEmblem on top of it, and then save it as one picture.
For example (pseudocode):
Expand|Select|Wrap|Line Numbers
- gfx->DrawImage(pngFrame);
- gfx->DrawImage(pngEmblem);
- gfx->SaveTo(C:\\picture.png);
They are PNG files so it handles the transparency automatically. But yea, can I get some help with this one?