Thread: Edit control

  1. #1
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125

    Edit control

    Hi all;

    Just say you were writing a calculator and when the user clicks 7 it puts 7 in a edit control, then say the user clicks 8 you want it to put the 8 next to the 7. insted of clearing the 7 and putting an 8.

    How is this done. is there a WM_ or a ES_ because at the moment i cant find one. i have searched everywhere. The way im doing it now is i have a buffer and i store the text from the edit control to the buffer but this courses more problems further in my program. all i want to is is append the text to the end...

    thanks.

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    are you using MFC or Win32?

  3. #3
    V
    Guest
    Regardless of what you're using, I think your goal should be to make it work by:

    1) Read the control's text
    2) Append the digit using standard string commands
    3) Write the new text to the control

    This is how I'd do it. Using OWL/MFC, this is a pretty easy task; I've never tried it in WinAPI but it shouldn't be that hard -- it sounds like you're already doing reading/writing of the control, so it's no harder than your current system.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I send a text string to an edit control
    By marc74 in forum Windows Programming
    Replies: 5
    Last Post: 01-06-2005, 10:14 PM
  2. Appending text to an edit control
    By dit6a9 in forum Windows Programming
    Replies: 3
    Last Post: 08-13-2004, 09:52 PM
  3. Restricting input to an edit control
    By bennyandthejets in forum Windows Programming
    Replies: 7
    Last Post: 10-05-2003, 01:10 AM
  4. endless edit control
    By ZerOrDie in forum Windows Programming
    Replies: 3
    Last Post: 03-21-2003, 02:51 AM
  5. Keeping focus on an edit control ...
    By Unregistered in forum Windows Programming
    Replies: 3
    Last Post: 02-19-2002, 02:12 AM