Groups | Blog | Home
all groups > vb.net > january 2008 >

vb.net : EM_GETCHARFORMAT, SCF_SELECTION and CFM_UNDERLINETYPE question


Academia
1/31/2008 9:54:23 AM
I use EM_GETCHARFORMAT, SCF_SELECTION and CFM_UNDERLINETYPE to get the
underline type.

And it works all the time except when there is no underlined text.

Then it returns: 1 (CFU_UNDERLINE). Which is the code for a single underline
line.

I'd expect: 0 (CFU_UNDERLINENONE)

The "1" return happens if I check immediately after loading the form and it
contains no text.

Or if I have text, some with underline and some without, and I check the
text without.

Or if I check text that is mixed underline and not underlined. (Since
SCF_SELECTION checks the first character in the selection this should not be
a problem).

It also returns that if the text type is a single underline (as it should).

If the type is something else, say thick, it returns what is expected.



Anyone have a clue as to what is going on?



Thanks













Herfried K. Wagner [MVP]
1/31/2008 4:24:33 PM
"Academia" <academiaNOSPAM@a-znet.com> schrieb:
[quoted text, click to view]

I do not have an idea, but I suggest to post a code snippet to be able to
repro the problem.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button