|
-
Dec 13th, 2001, 12:19 PM
#1
Thread Starter
Member
RichEdit 2.0 help
Ok, I originally posted this in the VB forum but did not get any response, so hopefully some of you C/C++ guys know the answer
When using the RichTextBox ActiveX control (which is based on RichEdit 1.0) 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:
Dim cf As CHARFORMAT2
Dim selBold As Boolean
cf.cbSize = Len(cf)
cf.dwMask = CFM_BOLD
SendMessage hWndRichEd, EM_GETCHARFORMAT, SCF_SELECTION, cf
selBold = ((cf.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????
BTW, hWndRichEd is the handle to a richedit 2.0 window that I created via CreateWindowEx and is not an ActiveX control.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|