Results 1 to 4 of 4

Thread: Need help with Richtext (again)

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Unhappy

    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Guest
    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

  3. #3

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width