Hello all,

When using the RichTextBox that comes with VB, the SelBold property returns one of three values:

True - ALL of the selected text is bold
False - NONE of the selected text is bold
Null - Some of the selected text is bold, some is not.

Now, on to the problem:
I can't figure out how to tell if some, but not all, of the selected text is bold. I have the following code:

VB Code:
  1. Dim cf As CHARFORMAT2
  2. Dim selBold As Boolean
  3.  
  4. cf.cbSize = Len(cf)
  5. cf.dwMask = CFM_BOLD
  6. SendMessage hWndRichEd, EM_GETCHARFORMAT, SCF_SELECTION, cf
  7.  
  8. selBold = ((cf2.dwEffects And CFE_BOLD) = CFE_BOLD)

This will only give me a true or a false...any ideas on how to determine if some, but not all, of the selected text is bold????

Thanks