CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    MFC General: How to make a simple text editor?

    Q: How to make a simple text editor?

    A: MFC AppWizard can help you to create in less than one minute a base text editor that implements:
    • text editing;
    • open and save from/to files;
    • clipboard operations: cut, copy, and paste;
    • undo last change;
    • print and print preview.

    Here are the steps to follow:
    • Visual C++ 6.0


      • choose "File/New/Project" menu item or press "Ctrl+N";
      • in "New" dialog box, type the project name and choose "MFC AppWizard(exe)";
      • push "OK" button; the "MFC Application Wizard" appears;
      • in MFC AppWizard - Step 1: select "Single document" then push "Next" button;
      • in MFC AppWizard - Step 2 to 5: push "Next" button;
      • in MFC AppWizard - Step 6: change the base class of view from default "CView" to "CEditView";
      • push "Finish" button; the "New Project Information" dialog appears;
      • push "OK" button.



    • Visual C++ 200x


      • choose "File/New/Project" menu item or press "Ctrl+Shift+N";
      • in "New Project" dialog box, type the project name, then choose "Visual C++ Projects/MFC" and "MFC Application;
      • push "OK" button; the "MFC Application Wizard" appears;
      • select Application type "Single document";
      • select from the left list "Generated Classes" item and change the base class for the view from default "CView" to "CEditView";
      • push "Finish" button.



    Further, if you want, you can enjoy improving it by adding new functions like changing font, search, replace, and so on.


    Last edited by ovidiucucu; October 5th, 2008 at 10:55 AM. Reason: repaced ".NET" with "200x"

Tags for this Thread

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