Help needed from GDI(+) guru

related to programming for xlobby, code samples, examples etc.

Help needed from GDI(+) guru

Postby P3rv3rt B3ar on Sat Nov 08, 2008 4:13 pm

Im having problem to render text over Bitmap class from GDI+... I would suppose i need a DC for that beast to type on with TextOut, but its not clear to me how to get it. Data is originally as byte array, which i wrap into this Bitmap container for easy saving to a file, so aproaches which perform magic directly to array or its derivates are also welcome as long as results are easyly wrappable into Bitmap again. Language is C++ and IDE is MSVC 2005.

Can u tell i skipped few classes of GUI coding :lol:
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: Help needed from GDI(+) guru

Postby P3rv3rt B3ar on Sat Nov 15, 2008 2:33 pm

ok i finally got a hold of it: first u create Graphics object from Bitmap, then u get handle2DC from Graphics after which u r able to TextOut all u want to HDC, Finally u need to call graphics releaseDC for the handle.
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron