CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Posts
    45

    Appending Text in RichEdit

    Hello Everybody,
    I have a problem how do i Append a string in an RichEdit box in Win32 API.

    Thanking You,
    Sonali.....

    HAVE A GUD DAY!!!!!

  2. #2
    Join Date
    Nov 2002
    Location
    Israel
    Posts
    182
    SendMessage(hWnd, EM_SETSEL, - 1, 0);
    SendMessage(hWnd, EM_REPLACESEL, (WPARAM)bCanUndo, (LPARAM)text);

    I don't remember what exactly must be -1, 0 or 0, -1 in the first SendMessage.
    Good luck

  3. #3
    Join Date
    Aug 2002
    Location
    United States
    Posts
    729
    CHARRANGE cr;
    cr.cpMin = -1;
    cr.cpMax = -1;

    SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&cr);
    SendMessage(hwnd, EM_REPLACESEL, 0, (LPARAM)stringtoadd);

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

Featured