Text editor in a nutshell
Channel:
Subscribers:
7,250
Published on ● Video Link: https://www.youtube.com/watch?v=VDSxkCwlY60
Yep. That is about it. Catch all the WM_CHAR messages that are translated from virtual key codes by TranslateMessage you call in your message loop. Append the character to your dynamic character array (I use custom string named "text"). Invalidate your client area. And just paint it in WM_PAINT. Detect backspace and remove character instead of adding it.
Yep. That's it. Shocking, isn't it? I was certainly for me. I was expecting this to be insanely hard thing to implement. Well well well...
P.S. Yes, of course that is many more "meat" to the full-fledged text editor. But no matter how big it is or how many features it support, it will still use exactly the same core mechanism displayed here!
Other Videos By ScienceDiscoverer
2024-02-08 | Knifing Yagluth |
2024-02-01 | The Kingdom of Science |
2024-01-27 | My typical coal run |
2024-01-23 | Self-Sufficient Public Coal Autominer |
2023-12-17 | HELLO BOX DIRECTX 12 |
2023-12-14 | horizontally and vertically spinning rat |
2023-10-27 | Arachnodactyly Theme Song (Lyrics) |
2023-10-04 | Debunking Monty Hall problem fallacy |
2023-09-22 | Steam Screenshot Downloader |
2023-09-17 | Notepad++ C++ IDE |
2023-09-07 | Text editor in a nutshell |
2023-07-13 | Highlighting Notepad++ lines from unrelated process console window. No plug-ins used! |
2023-07-03 | Some Micro Wurmz & Cellz |
2023-07-03 | Wolfie in a Bug Prison |
2023-07-02 | Beetle 60x |
2023-07-02 | Baking Yeast 120x |
2023-07-02 | Moon at 56x - 140x |
2023-07-02 | My Parrot First Time in my life! |
2023-07-02 | BARDIN IS THE BEST BARD |
2023-07-02 | Food into wagon, steel through rat, if the Elf can hold her drink, I'll eat my cousins hat! |
2023-07-02 | Copper Wire |