Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ GDI+
Hi all,
In gdiplus, When I use "DrawString", everything is all right, but when I use "DrawDriverString" to draw a string with underline style, I got nothing, noting is desplayed.
By the way, how to use "DrawDriverString" to draw a multiLine text.
My English is very poor, hope you can understand.
Posted 16-Nov-11 21:48pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Just a guess, the DrawDriverString documentation[^] states:

The method assumes that the client has already set up the format and layout to be applied.
 
Did you satisfy the above requirement?
 

You should post the (relevant) code to get better help.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

thanks, I find some documentations about the method.

[^]
(GDI+ DrawDriverString doesn't handle underlined or stroken out fonts as expected): we had to implement this by hand
 
If anyone wants to draw text using Gdiplus(GDI+) with font styles (including
strikeout and underline), please use DrawString() instead of
DrawDriverString() because the latter does'nt seems to support underlining &
striking of font characters though the font is properly loaded(displays empty
spaces in place of underlined and striked out chars), but the former supports
all FontStyles.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 PIEBALDconsult 110
4 Sergey Alexandrovich Kryukov 104
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 17 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100