Three questions about editbox?
-
26-09-2019 - |
Question
I have three questions about editbox control in WINAPI (i can't find information on msdn about this) 1. How to disable moving typeing cursor with mouse, arrows, backspace in editbox ? I want to make typing like in command line in dos, but with out backspace.
Can I write some piece of text with red color, and another with blue ?
How to write to editbox control from another thread ?
Solution
- Make it read-only (
ES_READONLY
) & manually intercept keystrokes and append only those you want to. - No, you would need to use a
RICHEDIT
class for that and use RTF. (You could owner draw a normal EDIT window but that would not be much fun) SendMessage
withWM_SETTEXT
(OrEM_SETTEXTEX
/EM_REPLACESEL
if you use aRICHEDIT
)
Why not use a Console?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow