English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For example, i want to do a DrawText on a DC and of this string:
"hello world". I want hello to be red and world to be blue. is this possible without using labels and putting one after the other?

2006-06-20 09:08:48 · 3 answers · asked by george_a_lutz 1 in Computers & Internet Programming & Design

3 answers

For the poster above, he said he doesn't want to do it in multiple labels. So his only bet is making his own control or using the richbox control.

George, Not without reimplementing part of STATIC control.
And if you're going to do that, you might just as well implement your own control...

Take a look at codeproject for some similar controls that you could use. In other words you would need to use the RichTextBox (something like that) control.

2006-06-20 09:21:05 · answer #1 · answered by ? 6 · 0 0

just create two DCs

one is registered with red pen
and another with blue pen

first drawtext with DC1 and write Hello
and then drawtext with DC2 and write World

2006-06-20 16:13:02 · answer #2 · answered by $$-SilentSakky-$$ 4 · 0 0

mfc?

2006-06-20 16:12:28 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers