Text Editor

This is a discussion on Text Editor within the Windows Programming forums, part of the Platform Specific Boards category; I have made a simple text editor and was wondering how I would do three things: 1.) Select all text ...

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    109

    Text Editor

    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

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786

    Re: Text Editor

    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)
    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...

    Originally posted by Granger9
    2.) Colour code my C programing and HTML
    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 message

    Originally posted by Granger9
    3.) Make my own shortcut keys (eg. Ctrl + A)
    Look up the LoadAccelerators() function

  3. #3
    kuphryn
    Guest
    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

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    109
    Sorry but I can't find Ken Fitlike's site can someone please give me its address.

    Thanks
    Daniel Granger

  5. #5
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    TNT
    You Can Stop Me, But You Cant Stop Us All

  6. #6
    Registered User
    Join Date
    Aug 2002
    Posts
    109

    EM_SETSEL

    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. creating very simple text editor using c
    By if13121 in forum C Programming
    Replies: 9
    Last Post: 10-19-2010, 05:26 PM
  2. C++ For Text Editor?
    By bmroyer in forum C++ Programming
    Replies: 12
    Last Post: 04-05-2005, 02:17 AM
  3. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 03:49 PM
  4. help about text editor
    By nag in forum C++ Programming
    Replies: 2
    Last Post: 04-24-2003, 11:45 AM
  5. Making a text editor
    By neandrake in forum C++ Programming
    Replies: 5
    Last Post: 02-26-2002, 10:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21