How do I put text in a specified spot of an EDIT box?(PLEASE READ!)

This is a discussion on How do I put text in a specified spot of an EDIT box?(PLEASE READ!) within the Windows Programming forums, part of the Platform Specific Boards category; Ok, when I have an EDIT box, I know how to add to the END of the text in it(It's ...

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question How do I put text in a specified spot of an EDIT box?(PLEASE READ!)

    Ok, when I have an EDIT box, I know how to add to the END of the text in it(It's multi-line), but how do I add text to the spot of the caret's current position? Please post some code!
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    someone posted this code a while ago...do a search.

  3. #3
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125
    I have never done anything using a caret before, but i remember seing a function something similar to GetCaretPos(); so couldnt you just use this to get the posistion of the caret and then when you paste, or copy or whatever the text into the edit box, pass it at the location returned by GetCaretPos.

    sorry i have no code for you, but like i said i have not done this.
    arrh, i got nothing good to say.
    http://www.praxis1.vic.edu.au/home/dcola/

  4. #4
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Post Ken, I could...

    KEN, I couldn't find any matches for a search. Do you know what the URL(or Forum page) for the one posted awhile back?
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  5. #5
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    I dunno...I'll look a page~2/3 back. I think it was someone's question about setting text to an editbox without SetDlgItemText...I'll search.

  6. #6
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    I didn't find it, but try this

    SendMessage(hwndEdit, WM_SETTEXT /*dunno if this is right*/, (WPARAM)5, (LPARAM)5);

    then replace the 5,5 with numbers you want...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Struggling to read text from Edit Control (box)
    By csonx_p in forum Windows Programming
    Replies: 6
    Last Post: 05-13-2008, 04:55 AM
  2. How to use FTP?
    By maxorator in forum C++ Programming
    Replies: 8
    Last Post: 11-04-2005, 02:17 PM
  3. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 03:49 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM

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