RE: help getting handle of an element.
Instead of using GetDC() (which implies GDI), try getting the data into a Bitmap object (which is in the far better GDI+).
Using the GDI+ API will allow you to render text easily, and quickly save the file in one of a number of formats.
Even if you have to get a DC, it should be possible to use a GetHandle-type call on the element with the ID of 'Avatar', and then copy the data from that DC to the Bitmap.
If you like, I'll post more information later when I've had a chance to fully research it.
|