text editor

This is a discussion on text editor within the Windows Programming forums, part of the Platform Specific Boards category; Hi everyone, I`m working at a small project in VC++.NET 2005, for school, a simple text editor, and I couldn`t ...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    1

    text editor

    Hi everyone, I`m working at a small project in VC++.NET 2005, for school, a simple text editor, and I couldn`t find how to do some things, I hope to find some help here. I don`t have much experience in visual programming.

    So, here are my questions
    - how can I load into a combobox the list of the fonts installed in the system. I know how to add an item to a combobox, but I couldn`t find how to get the font list
    - I select some some text and I want to change it`s font size (the font size I select from a combobox). The problem is that when I click the combobox to choose the desired font size, the text that was selected is not selected anymore. This should be simple but I couldn`t find a solution
    - I want to be able to have more then one file open at a time, so right now I have an array in which I store the name of the files, and when I switch between files I save the current file in a temp file. This works but it`s not very nice, so if someone could suggest a better solution.

    Ok, so these are my questions, at least for now

  2. #2
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Windows specific, please move.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    - how can I load into a combobox the list of the fonts installed in the system. I know how to add an item to a combobox, but I couldn`t find how to get the font list
    What about search net? Have you tried http://gethelp.devx.com/techtips/pb_...10min0200b.asp for a start?


    - I want to be able to have more then one file open at a time
    You can do it. What is the problem?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    ... right now I have an array in which I store the name of the files, and when I switch between files I save the current file in a temp file. This works but it`s not very nice, so if someone could suggest a better solution.
    Sure, a vector or array or container of some sort that holds the file pointers/streams would work well.

    - I select some some text and I want to change it`s font size (the font size I select from a combobox). The problem is that when I click the combobox to choose the desired font size, the text that was selected is not selected anymore. This should be simple but I couldn`t find a solution
    I'm sure you can set selected text; that might work, but it's a kind of kludge. I guess comboboxes take focus when you click on them. You could try another kind of widget.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

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. text editor
    By akki in forum C Programming
    Replies: 5
    Last Post: 07-11-2009, 02:05 PM
  3. C++ For Text Editor?
    By bmroyer in forum C++ Programming
    Replies: 12
    Last Post: 04-05-2005, 02:17 AM
  4. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 03:49 PM
  5. help about text editor
    By nag in forum C++ Programming
    Replies: 2
    Last Post: 04-24-2003, 11:45 AM

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