-
Anyone have an example of the use of the EM_STREAMOUT (or even the EM_STREAMIN) richtext commands in vb?http://msdn.microsoft.com/library/ps...hedit_6sl0.htm
The code samples are in c++ and c has never been my strong point. I don't trust my ability to properly convert the variables to the equivalent vb ones.
-
I guess this could be a start:
Add to a Module.
Code:
Type EDITSTREAM
dwCookie As Long
dwError As Long
pfnCallBack As Long
End Type
Const WM_USER = &H400
Const EM_STREAMIN = (WM_USER + 73)
Const SF_TEXT = &H1
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Function EditStreamCallback(ByVal dwCookie As Long, ByVal pbBuff As Long, ByVal cb As Long, ByVal pcb As Long) As Long
End Function
Add to a Form
Code:
Private Sub Command1_Click()
Dim ES As EDITSTREAM
SendMessage RichTextBox1.hwnd, EM_STREAMIN, SF_TEXT, ES
End Sub
-
that is about as far as i got on my own. I dont understand what it passes to the function. It supposedly calls it multiple times for each use.
-
MEGATRON, i tried that exactly as you posted, and every time i tried it, vb crashed. I was trying to use it on richtextbox1 and it just didn't like it.