![]() |
|
#1
|
|||
|
|||
text editorHi 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
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
|
|||
|
|||
Re: text editorQuote:
You will want to use the font chooser (common control) for your font management such as face and size. However, if you want to populate your own comboboxes with font faces and sizes (remembering that every font doesn't support all of the same sizes), you will want to enumerate the available fonts installed on the system for their details. See: msdn.microsoft.com ...for more details. Most word processing systems that I've used store the "current document" in a temporary file during processing. The format of temporary files can include "undo" lists, too, so they are not necessarily a format conforming with what a "saved" file would be for the given tool. An "array" of filenames is probably a less-than desirable choice. I'd probably use a vector of strings as the memory management and string manipulation would be much easier. Better might be a "Document/View" type architecture whereby the document class would be the content of the word processing and the view class would be the document renderer/editor. If you are not already familiar with MDI applications, perhaps it is a place to seek more information. :davis: |
Recent GIDBlog
Toyota - 2008 November Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Writing a text editor? | alyks | C++ Forum | 13 | 30-Sep-2005 22:44 |
| need help on text file analyser | ffantasy | C Programming Language | 1 | 05-Sep-2005 14:44 |
| saving html text | dopee | MySQL / PHP Forum | 1 | 17-Jan-2005 05:15 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The