CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: text editor

  1. #1
    Join Date
    Nov 2006
    Posts
    3

    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
    Join Date
    May 2006
    Location
    Norway
    Posts
    1,709

    Re: text editor

    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

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: text editor

    Quote Originally Posted by Jcooper
    - 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.
    However, much more easier is to use CFontDialog, instead.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  4. #4
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: text editor

    Quote Originally Posted by Jcooper
    - 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.

  5. #5
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: text editor

    Quote Originally Posted by ovidiucucu
    Easy. Take a look at THIS THREAD.
    LOL!! Simplu, simplu...

  6. #6
    Join Date
    Nov 2006
    Posts
    3

    Re: text editor

    Quote Originally Posted by ovidiucucu
    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
    - so I have that find form which I open when i click on the find menu item, like this
    Code:
    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?

  7. #7
    Join Date
    Apr 1999
    Posts
    27,449

    Re: text editor

    Quote Originally Posted by Jcooper
    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.
    Code:
    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

  8. #8
    Join Date
    Nov 2006
    Posts
    3

    Re: text editor

    Ok, i`m sorry for that, maybe a moderator can move this topic where it belongs.

  9. #9
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: text editor

    [ Redirected thread ]

    Quote Originally Posted by Jcooper
    Ok, i`m sorry for that, maybe a moderator can move this topic where it belongs.
    As you wish...
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured