I have made a simple text editor and was wondering how I would do three things:
1.) Select all text (like press Ctrl +A)
2.) Colour code my C programing and HTML
3.) Make my own shortcut keys (eg. Ctrl + A)
Thanks Daniel Granger :cool:
Printable View
I have made a simple text editor and was wondering how I would do three things:
1.) Select all text (like press Ctrl +A)
2.) Colour code my C programing and HTML
3.) Make my own shortcut keys (eg. Ctrl + A)
Thanks Daniel Granger :cool:
If like most people, you have used an edit control, use a EM_SETSEL to that control....look it up on MSDN for implementation details...Quote:
Originally posted by Granger9
I have made a simple text editor and was wondering how I would do three things:
1.) Select all text (like press Ctrl +A)
Use a richedit control (look at Ken Fitlike's site - from this board - to see how to implement it).Then to change colour look up the EM_SETCHARFORMAT messageQuote:
Originally posted by Granger9
2.) Colour code my C programing and HTML
Look up the LoadAccelerators() functionQuote:
Originally posted by Granger9
3.) Make my own shortcut keys (eg. Ctrl + A)
Are you using MFC? If yes, what view?
I have more experiece with the editview. I believe the richeditview has more features. However, if I remember correctly, there is a line limitation to it. In other words, the richeditview could only handle up to 64k of text. I am not completely sure though. I remember Jeff Prosise discussing this issue in his book, Programming Windows with MFC Second Edition.
Kuphryn
Sorry but I can't find Ken Fitlike's site can someone please give me its address.
Thanks
Daniel Granger
http://www.foosyerdoos.fsnet.co.uk Top Site :)
I'm new to all this C programming stuff and I can't seem to get MSDN (I can only get stuff on windows CE) work to my advantage so can some please tell me how to use the EM_SETSEL function