Solved

How to get bitmap from character

Posted on 1998-01-05
2
488 Views
Last Modified: 2013-12-02
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: 1256918
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: 1256919
Sounds quite simple!
I suppose this works for bitmap fonts as well as for TrueType fonts ?

Thanks for answering !
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

815 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now