|
-
December 9th, 1999, 05:42 PM
#1
How do i find the number of characters in a rich edit control?
I'm using vb6 and the richedit 2.0 control. I want to be able to quickly get the number of characters in the control. (other than using len(textrtf) which is waaaay to slow) I know that there is a user defined message for the control (EM_GETTEXTLENGTHEX), that i found in msdn. This message takes a c structure as one of its parameters, i set all this up from the information in richedit.h but i don't think the data types are compatible. Has anyone used this message in vb before, or has another way to get this information?
-
December 10th, 1999, 01:43 AM
#2
Re: How do i find the number of characters in a rich edit control?
This should work quickly..
iCount = len(replace(RichEditBox1.Text," ",""))
--
Chizl
[email protected]
http://www.chizl.com/
-
December 10th, 1999, 10:23 AM
#3
Re: How do i find the number of characters in a rich edit control?
I'm not trying to simply ignore spaces, in the end, i'm trying to find the number of bytes in the control. I cannot simply reference the text or textRTF properties of the control in visual basic, every time that happens, the computer pauses while it brings the variable into a vb string (this takes a long time if you have ole images in the rich text control)... so i need to use a message of some sort.
-
December 13th, 1999, 12:50 PM
#4
Re: How do i find the number of characters in a rich edit control?
nevermind... the vb ocx of the rich edit control is the 1.0 version of the rich edit control, which doesn't understand this message. I had to do a loadlibrary on the riched20.dll and do a CreateWindowEx to put the 2.0 control on the form. Now it understands the message, but now i lose the ease of the ocx typelib and have to do everything myself.
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
|