Adding text to an edit box

This is a discussion on Adding text to an edit box within the Windows Programming forums, part of the Platform Specific Boards category; Is there any way to add text to an edit box where the curser is located. Right now if you ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    81

    Adding text to an edit box

    Is there any way to add text to an edit box where the curser is located. Right now if you past something it recopys all the text in the edit box and automatically puts it at the end so doesn't anyone know how to make it be placed where the curser is?

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    Take a look at sending the edit a EM_REPLACECURSEL. This replaces the current selection. If there is no selection it adds the text where the caret is.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  2. Replies: 2
    Last Post: 05-31-2005, 04:02 PM
  3. adding a line of text to a readonly edit control?
    By Kibble in forum Windows Programming
    Replies: 2
    Last Post: 11-25-2002, 09:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21