Solved

Bitmap from character

Posted on 1998-01-05
2
553 Views
Last Modified: 2013-12-03
How can I get a HBITMAP of a single character ?
I have found an example somewhere that uses GetGlyphOutline, but this seems to work only for TrueType fonts. Is there a similar function for bitmap fonts, or does anyone know another method to create a HBITMAP from a single character ?

Thanks, Marc
0
Comment
Question by:parlando
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 200 total points
ID: 1409853
First create memory DC by CreateCompatibleDC.
Then create compatible bitmap using CreateCompatibleBitmap with size as character sell. Select bitmap into DC. Draw character using DrawText or (Ext)TextOut on memory DC. Reselect old bitmap. Now you have character bitmap
0
 

Author Comment

by:parlando
ID: 1409854
Comment added in C language section.
Would be euseless to keep the problem running in both sections :-)

Thanks again,
Marc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question