Click to See Complete Forum and Search --> : text editor


Jcooper
November 22nd, 2006, 11:19 AM
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

laitinen
November 22nd, 2006, 11:34 AM
Hi!

Dont know if this answers all your questions, but take a look at this;

http://www.codeguru.com/forum/showthread.php?t=375000

Cheers,

Laitinen

ovidiucucu
November 22nd, 2006, 11:46 AM
- 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
Easy. Take a look at THIS THREAD (http://www.programare.org/viewtopic.php?t=1418). :D
However, much more easier is to use CFontDialog (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cfontdialog.asp), instead.

ovidiucucu
November 22nd, 2006, 11:56 AM
- 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.
If you make a MDI MFC application then no need to store yourself the file names... blah blah... the framework already takes care of that.

Please, please... to avoid further running around tail, please describe clearer your application!
Are you using MFC? What kind is your application, what kind of view are you using?... and so on.

gstercken
November 22nd, 2006, 12:28 PM
Easy. Take a look at THIS THREAD (http://www.programare.org/viewtopic.php?t=1418). :DLOL!! Simplu, simplu... ;)

Jcooper
November 24th, 2006, 03:46 PM
If you make a MDI MFC application then no need to store yourself the file names... blah blah... the framework already takes care of that.

Please, please... to avoid further running around tail, please describe clearer your application!
Are you using MFC? What kind is your application, what kind of view are you using?... and so on.

No, i`m not using MFC, it`s a CLR Windows Form Application. The main form contains a menu, toolbar, richtextbox, statusbar + some dialogs and I have few more forms (find, replace, stats).

Now I have some fresh ones :D
- so I have that find form which I open when i click on the find menu item, like this
Search^ find =gcnew Search;
find->Visible=true;
find->Activate();


how can I acces from the find form the richTextBox from Form1 to call it`s find method?

- can you give me an example of how to use the print preview dialog and the print dialog. I understood that I have to create a handle... On MSDN I found only examples for VB and C#, I`ve tried to adapt it to C++ but something didn`t work.

- how can I delete a file, I`ve found a function DeleteFile what do I need to include to be able to use it?

Paul McKenzie
November 24th, 2006, 06:00 PM
No, i`m not using MFC, it`s a CLR Windows Form Application.Sorry to tell you this, but you're in the wrong forum.
Search^ find =gcnew Search;
find->Visible=true;
find->Activate();

This is not C++ code. Please go to the Managed C++ forum. This forum is reserved for traditional C++ code, not managed C++.

Regards,

Paul McKenzie

Jcooper
November 25th, 2006, 08:14 AM
Ok, i`m sorry for that, maybe a moderator can move this topic where it belongs.

ovidiucucu
November 25th, 2006, 09:34 AM
[ Redirected thread ]

Ok, i`m sorry for that, maybe a moderator can move this topic where it belongs.
As you wish...;)