-
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.
-
are you using MFC or Win32?
-
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.