rippin
Dec 12th, 2001, 04:52 PM
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:
Dim cf As CHARFORMAT2
Dim selBold As Boolean
cf.cbSize = Len(cf)
cf.dwMask = CFM_BOLD
SendMessage hWndRichEd, EM_GETCHARFORMAT, SCF_SELECTION, cf
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
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:
Dim cf As CHARFORMAT2
Dim selBold As Boolean
cf.cbSize = Len(cf)
cf.dwMask = CFM_BOLD
SendMessage hWndRichEd, EM_GETCHARFORMAT, SCF_SELECTION, cf
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