GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 22-Nov-2006, 10:17
cooper cooper is offline
New Member
 
Join Date: Nov 2006
Posts: 1
cooper is on a distinguished road

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  
Old 25-Nov-2006, 05:11
davis
 
Posts: n/a

Re: text editor


Quote:
Originally Posted by cooper
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

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 GIDBlogToyota - 2008 November Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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

All times are GMT -6. The time now is 19:46.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.